-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
do not require custom build of tini | ||
|
||
https://github.com/krallin/tini/issues/55#issuecomment-260507562 | ||
|
||
host# docker run --init --rm -it glen/pld bash -l | ||
bash-4.4# /dev/init -- sh -c 'echo "kala" "maja"; cat /proc/$$/cmdline|tr "\0" "\n">cmdline' | ||
[WARN tini (39)] Tini is not running as PID 1 and isn't registered as a child subreaper. | ||
Zombie processes will not be re-parented to Tini, so zombie reaping won't work. | ||
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1. | ||
kala maja | ||
bash-4.4# cat cmdline | ||
sh | ||
-c | ||
echo "kala" "maja"; cat /proc/$$/cmdline|tr "\0" "\n">cmdline | ||
bash-4.4# | ||
|
||
--- docker-1.13.0-rc1/daemon/oci_linux.go~ 2016-11-11 12:27:33.000000000 +0200 | ||
+++ docker-1.13.0-rc1/daemon/oci_linux.go 2016-11-15 02:42:25.660635864 +0200 | ||
@@ -593,7 +593,7 @@ | ||
if c.HostConfig.PidMode.IsPrivate() { | ||
if (c.HostConfig.Init != nil && *c.HostConfig.Init) || | ||
(c.HostConfig.Init == nil && daemon.configStore.Init) { | ||
- s.Process.Args = append([]string{"/dev/init", c.Path}, c.Args...) | ||
+ s.Process.Args = append([]string{"/dev/init", "--", c.Path}, c.Args...) | ||
var path string | ||
if daemon.configStore.InitPath == "" && c.HostConfig.InitPath == "" { | ||
path, err = exec.LookPath(DefaultInitBinary) |