From d4559313d5b0284bf2544d83e6431873c06f8349 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Mon, 2 May 2016 14:23:38 -0400 Subject: [PATCH] Set Pdeathsig for containerd on SIGKILL Makes sure containerd exits (when started by docker) if docker gets SIGKILL'd. Signed-off-by: Brian Goff --- libcontainerd/remote_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainerd/remote_linux.go b/libcontainerd/remote_linux.go index 436f43c9d7..2f5bb9b700 100644 --- a/libcontainerd/remote_linux.go +++ b/libcontainerd/remote_linux.go @@ -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() {