Mike McClurg
6f6b51f869
Rewrite arbitrary signals, and update tests
...
We've decided to allow arbitrary signal rewriting, not just SIGTERM
rewriting. To use, call dumb-init with the '-r s:r' option, which will
rewrite signum s to signum r. Only signals 1-31 are allowed to be
rewritten, which should cover all the signals we need to cover.
Note that this commit does not add new tests, it only fixes the existing
broken test.
2016-06-09 16:05:27 -06:00
Mike McClurg
3b6e9f256f
Add '--signal' option to replace SIGTERM
...
Many servers respond to other signals than SIGTERM for their "soft
shutdown" option, such as Unicorn which requires SIGQUIT to wait on
outstanding connections. The 'docker stop' command sends the SIGTERM
signal to the container, and provides no option for modifying this
behavior. The 'docker kill' command has an '-s' option which allows one
to modify the signal sent to the container, but orchestration frameworks
such as Mesos don't provide a way to use this functionality.
This commit adds the '-s/--signal' option to dumb-init, which provides a
replacement signal for SIGTERM. For instance, running dumb-init like so:
dumb-init -s 3 <command>
Will send SIGQUIT (3) to the <command> process it spawns when it
receives a SIGTERM. This allows Docker image writers the freedom to
specify how SIGTERM will behave in their containers.
A further improvement to this option could be to provide an arbirary
mapping from signal to signal, but that would greatly complicate the
code for a probably minor use case.
2016-06-08 16:20:57 -06:00
Chris Kuehl
662a3b7096
Release v1.0.3
2016-06-01 20:42:37 -04:00
Anthony Sottile
4ebd31a80e
Merge pull request #82 from chriskuehl/fix-exec-fail-message
...
Fix incorrect error on bad exec when passing args
2016-05-28 03:01:56 -07:00
Chris Kuehl
b7aee39721
Fix incorrect error on bad exec when passing args
2016-05-28 02:03:19 -04:00
Anthony Sottile
e0ec865a6a
Merge pull request #79 from chriskuehl/better-document-build-process
...
Document the build process better
2016-05-20 10:20:01 -07:00
Chris Kuehl
060200eea6
Document the build process better
2016-05-20 09:50:59 -07:00
Anthony Sottile
c7c6b00dd7
Merge pull request #75 from asottile/non_purelib
...
dumb-init is not a pure python package
2016-05-14 22:19:18 -07:00
Anthony Sottile
3fb0f69730
dumb-init is not a pure python package
2016-05-14 22:04:54 -07:00
Chris Kuehl
407813e07a
Release v1.0.2
2016-05-02 11:41:45 -07:00
Chris Kuehl
6449c1ad62
Merge pull request #72 from chriskuehl/simplify-using-sigwait
...
Simplify signal handling using sigwait, eliminate some undefined behavior
2016-04-29 17:58:58 -07:00
Chris Kuehl
256edaef74
Simplify dumb-init behavior using sigwait
2016-04-29 17:13:52 -07:00
Buck Evan
6faf204a0b
Merge pull request #71 from chriskuehl/fix-flaky-job-control-tests
...
Fix flaky job control tests
2016-04-29 15:43:27 -07:00
Chris Kuehl
223da04e22
Fix flaky job control tests
2016-04-29 15:15:02 -07:00
Anthony Sottile
adc3c61bd0
Merge pull request #69 from Yelp/simplify_makefile
...
Simplify makefile slightly
2016-04-27 18:01:34 -07:00
Anthony Sottile
376c3b1425
Simplify makefile slightly
2016-04-27 16:22:56 -07:00
Chris Kuehl
322088f0e9
Merge pull request #66 from chriskuehl/add-xenial-itest
...
Add Ubuntu xenial itest, test Python 3.5, fix some test bitrot
2016-04-27 13:10:36 -07:00
Chris Kuehl
f6e9c31720
Run itest_xenial on CircleCI
2016-04-27 12:54:04 -07:00
Chris Kuehl
bc3ea40e44
Add Ubuntu xenial itest, also test Python 3.5
2016-04-27 12:47:10 -07:00
Anthony Sottile
ce8521cab8
Merge pull request #65 from sanmai-NL/patch-1
...
fix: calculate SHA256 hash value in binary mode
2016-04-05 09:10:26 -07:00
Sander Maijers
47e382ed40
fix: calculate SHA256 hash value in binary mode
...
Correctness fix. This change will not make a difference on Unix. See [https://www.virtualbox.org/ticket/9569 ].
2016-04-05 17:05:48 +02:00
Chris Kuehl
95c1e8473a
Merge pull request #64 from chriskuehl/improve-debian-based-on-upstream
...
Improve Debian packaging based on downstream package
2016-04-04 17:15:49 -07:00
Chris Kuehl
d90288f09e
Improve Debian packaging based on downstream package
2016-04-04 16:56:24 -07:00
Chris Kuehl
c2de8ef0c8
Merge pull request #62 from chriskuehl/checksum-releases
...
Upload SHA256 checksums of releases
2016-03-18 14:20:45 -07:00
Chris Kuehl
25e4e62b16
Upload SHA256 checksums of releases
2016-03-18 14:13:24 -07:00
Chris Kuehl
4f67cf84e5
Bump to v1.0.1
2016-03-11 14:15:15 -08:00
Chris Kuehl
b0ee6335b3
Merge pull request #60 from chriskuehl/fix-signal-terminated-processes-exit-code
...
Fix signal terminated processes exit code
2016-03-11 13:53:18 -08:00
Chris Kuehl
b579371582
Fix bit rot due to newer flake8
2016-03-11 13:42:56 -08:00
Chris Kuehl
d626878a0c
Fix exit status when process exits via signal
...
This fixes https://github.com/Yelp/dumb-init/issues/59
2016-03-11 13:42:00 -08:00
Chris Kuehl
a9eadb580c
Release v1.0.0
2016-01-07 15:10:21 -08:00
Buck Evan
87545be699
Merge pull request #50 from chriskuehl/pipefail-zombies
...
Fix stretch itest missing "ps" command, use pipefail to catch it earlier in the future
2016-01-07 14:58:02 -08:00
Chris Kuehl
4b37e64a1a
Set pipefail for test-zombies to not mask errors
2016-01-07 14:56:53 -08:00
Chris Kuehl
fec8e68405
Merge pull request #49 from chriskuehl/manpage
...
Add a manpage to the Debian package
2016-01-07 14:32:16 -08:00
Chris Kuehl
a589ceb756
Add a manpage to the Debian package
2016-01-07 13:53:21 -08:00
Chris Kuehl
20aa08533d
Merge pull request #47 from chriskuehl/release-binaries
...
Simplify release a bit, also provide just binaries
2016-01-07 13:24:24 -08:00
Chris Kuehl
2adfb6d3c5
Revise release instructions to not suggest clean
2016-01-07 11:24:46 -08:00
Chris Kuehl
8448b456c8
Simplify release a bit, also provide just binaries
2016-01-07 11:23:44 -08:00
Chris Kuehl
e862d69a26
Merge pull request #46 from kscherer/musl
...
Reduce binary size using musl
2016-01-07 11:22:33 -08:00
Konrad Scherer
17b3d6be84
Generate packages using musl
...
Signed-off-by: Konrad Scherer <kmscherer@gmail.com>
2016-01-07 13:47:36 -05:00
Konrad Scherer
1a89e4a6f8
README.md: Add instructions for building with musl
...
Signed-off-by: Konrad Scherer <kmscherer@gmail.com>
2016-01-07 13:45:32 -05:00
Konrad Scherer
1b612a8ecc
Strip the dumb-init binary to remove unnecessary symbols
...
Signed-off-by: Konrad Scherer <kmscherer@gmail.com>
2016-01-07 13:43:02 -05:00
Chris Kuehl
3582a92402
Fix typo in error message
2015-11-20 09:31:45 -08:00
Chris Kuehl
94505cde49
README: fix another typo
2015-10-28 23:26:13 -07:00
Chris Kuehl
468e642d57
Merge pull request #42 from chriskuehl/fix-typo
...
Fix typo in help message
2015-10-26 11:06:44 -07:00
Chris Kuehl
01f6064164
Fix typo in help message
2015-10-26 10:20:18 -07:00
Kent Wills
ffaa420179
Merge pull request #41 from chriskuehl/no-interactive-tests
...
Don't run tests interactively or with a TTY
2015-10-22 17:06:37 -07:00
Chris Kuehl
32a5e96b66
Don't run tests interactivly with a TTY
2015-10-22 16:43:50 -07:00
Chris Kuehl
c6dd18b116
README: fix typo
2015-10-15 14:36:38 -07:00
Chris Kuehl
153c6bf410
README: fix Docker link
2015-10-09 15:41:51 -07:00
Kent Wills
88f0106b28
Merge pull request #40 from chriskuehl/update-readme
...
README: better description of capabilities and reasons
2015-10-09 13:47:47 -07:00