From 6393bfbd40997dc7306fab7a30223655937ef4ee Mon Sep 17 00:00:00 2001 From: Victor Marmol Date: Tue, 23 Sep 2014 14:49:36 -0700 Subject: [PATCH] Also handle SIGTERM. --- cadvisor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cadvisor.go b/cadvisor.go index 68efb758..bf499ea8 100644 --- a/cadvisor.go +++ b/cadvisor.go @@ -22,6 +22,7 @@ import ( "os" "os/signal" "runtime" + "syscall" "github.com/golang/glog" "github.com/google/cadvisor/api" @@ -128,7 +129,7 @@ func setMaxProcs() { func installSignalHandler(containerManager manager.Manager) { c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, os.Kill) + signal.Notify(c, os.Interrupt, os.Kill, syscall.SIGTERM) // Block until a signal is received. go func() {