Time to do this — Python 2 is EOL. This exposed a bug in one of the
tests that was stripping the entire environment from its subprocesses
(though they did sort of work on Python 2).
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.
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!
- Don't mention options that don't exist in Usage.
- Don't include a log prefix when NO_ARGS is set.
- Turn up the default verbosity to FATAL when NO_ARGS is set.
- Expose verbosity via an ENV var for debugging.
The reaping test assumes that all the `sleep` processes on the system
are created by us, which is an incorrect assumption, and creates
problems now that we run in a more "complete" system in CI (i.e. not in
a minimal container).
This solves the issue by not assuming that random sleep processes are
related to us: instead, we look at whether these processes are in our
process group.
This also includes a little clean up of the reaping stage 1.
Tini ignores certain signals, and blocks others, but in both cases
we restore them before executing the child process.
Add tests to ensure that we actually do that!
Using the child subreaper mechanism, we can actually run
tests inside the CI environment without depending on Docker.
While this does not replace the existing tests, it allows
at least some functional coverage within CI.
Valgrind does like statically-linked binaries due to false positives
coming from libc, which are ignord only if Valgrind can tell they're in
libc (which isn't the case when using static linking).
This allows the use of `tini` within even more minimal environments (such as images that are `FROM scratch` with a single application binary `COPY`'d in).
Travis uses Ubuntu Precise, which has CMake 3.8. That version does not
have support for excluding /usr and /usr/bin from the %files% list
(which results in a package that conflicts with the filesystem package
and fails to install).
This commit:
+ Builds on Precise instead of Trusty
+ Adds install tests