Well designed software should not produce any zombie or re-parenting
processes.
This adds an option to warn in the logs when reaping of zombies is
happening so that it can be monitored and fixed in subsequent releases
of the software.
- `ARCH_SUFFIX` should not be passed at runtime: it's already passed as
a build argument, and it's consumed during the build (so it's too late
to change it at runtime).
- For consistency, pass `ARCH_NATIVE` and `CC` similarly at build time
as well: passing `CC` and `ARCH_SUFFIX` at different times is
particularly error-prone.
- Accept all parameters to `ddist.sh` via environment variables. It
doesn't make sense to accept exclusively `ARCH_SUFFIX` as a positional
argument when `ARCH_SUFFIX` alone doesn't accomplish anything (i.e.
you also need `CC`).
TODO: `CC` should be derived from `ARCH_SUFFIX` in the first place.
This required updating to Ubuntu Xenial for some of the cross compilers, but Travis doesn't support Xenial builders, so this instead converts Travis to use the already-existing "ddist.sh" script for building via Docker.
Also fixed a bug with the signals test, which didn't properly exercise
Tini: rather than check that Tini was properly exiting with 128 +
signal, it raced against Tini and was only successful if Tini didn't get
the change to spawn a subprocess!
PR_SET_CHILD_SUBREAPER actually requires a non-zero argument to `prctl`
in order to work..!
Now, this used to work just fine (and currently works in most places)
because when we use a libc that doesn't know about
PR_SET_CHILD_SUBREAPER, it doesn't do anything about the second argument
passed to `pctrl`, so we end up sending some junk in as the second
argument. What we send appears to be completely random and as such seems
very unlikely to be zero, and so things appear to work (e.g. the tests
all pass, etc.).
However, using a libc that does know about this argument (e.g. Ubuntu
Xenial), things *don't* work because the second argument is
automatically set to 0 when we don't provide one.
This probably went unnoticed for a while considering that `tini-static`
isn't affected (it's built on Trusty), and that this mode isn't enabled
by default in the first place.
Also adding a test in run_build.sh to ensure that the pre-processed
license is always up to date with the actual license file.
To recreate: `xxd -i LICENSE > src/license.h`