Set Pdeathsig for containerd on SIGKILL

Makes sure containerd exits (when started by docker) if docker gets
SIGKILL'd.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff 2016-05-02 14:23:38 -04:00
parent cb87b6eb6a
commit d4559313d5
No known key found for this signature in database
GPG key ID: 1E4121BEC1DCEC41

View file

@ -357,7 +357,7 @@ func (r *remote) runContainerdDaemon() error {
// redirect containerd logs to docker logs
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true, Pdeathsig: syscall.SIGKILL}
cmd.Env = nil
// clear the NOTIFY_SOCKET from the env when starting containerd
for _, e := range os.Environ() {