]>
Commit | Line | Data |
---|---|---|
7397034b | 1 | |
06691c53 ER |
2 | upstreamed: https://github.com/docker/docker/pull/28454 |
3 | ||
7397034b ER |
4 | do not require custom build of tini |
5 | ||
6 | https://github.com/krallin/tini/issues/55#issuecomment-260507562 | |
7 | ||
8 | host# docker run --init --rm -it glen/pld bash -l | |
9 | bash-4.4# /dev/init -- sh -c 'echo "kala" "maja"; cat /proc/$$/cmdline|tr "\0" "\n">cmdline' | |
10 | [WARN tini (39)] Tini is not running as PID 1 and isn't registered as a child subreaper. | |
11 | Zombie processes will not be re-parented to Tini, so zombie reaping won't work. | |
12 | 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. | |
13 | kala maja | |
14 | bash-4.4# cat cmdline | |
15 | sh | |
16 | -c | |
17 | echo "kala" "maja"; cat /proc/$$/cmdline|tr "\0" "\n">cmdline | |
18 | bash-4.4# | |
19 | ||
20 | --- docker-1.13.0-rc1/daemon/oci_linux.go~ 2016-11-11 12:27:33.000000000 +0200 | |
21 | +++ docker-1.13.0-rc1/daemon/oci_linux.go 2016-11-15 02:42:25.660635864 +0200 | |
22 | @@ -593,7 +593,7 @@ | |
23 | if c.HostConfig.PidMode.IsPrivate() { | |
24 | if (c.HostConfig.Init != nil && *c.HostConfig.Init) || | |
25 | (c.HostConfig.Init == nil && daemon.configStore.Init) { | |
26 | - s.Process.Args = append([]string{"/dev/init", c.Path}, c.Args...) | |
27 | + s.Process.Args = append([]string{"/dev/init", "--", c.Path}, c.Args...) | |
28 | var path string | |
29 | if daemon.configStore.InitPath == "" && c.HostConfig.InitPath == "" { | |
30 | path, err = exec.LookPath(DefaultInitBinary) |