From d20dc11cbe5936e286bcc8ddd7f2faabb82d5dc0 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Fri, 14 Mar 2014 11:42:01 -0700 Subject: [PATCH] Send sigterm to child instead of sigkill Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- nsinit/init.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nsinit/init.go b/nsinit/init.go index 5d47b9505..c702c7901 100644 --- a/nsinit/init.go +++ b/nsinit/init.go @@ -48,7 +48,9 @@ func (ns *linuxNs) Init(container *libcontainer.Container, uncleanRootfs, consol return fmt.Errorf("setctty %s", err) } } - if err := system.ParentDeathSignal(); err != nil { + // this is our best effort to let the process know that the parent has died and that it + // should it should act on it how it sees fit + if err := system.ParentDeathSignal(uintptr(syscall.SIGTERM)); err != nil { return fmt.Errorf("parent death signal %s", err) } if err := setupNewMountNamespace(rootfs, container.Mounts, console, container.ReadonlyFs, container.NoPivotRoot); err != nil {