Skip to content

Commit

Permalink
Merge pull request kubernetes#253 from vmarmol/shutdown
Browse files Browse the repository at this point in the history
Also handle SIGTERM.
  • Loading branch information
vishh committed Sep 23, 2014
2 parents 932d2a6 + 6393bfb commit 9f3c99f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cadvisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"os"
"os/signal"
"runtime"
"syscall"

"github.com/golang/glog"
"github.com/google/cadvisor/api"
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 9f3c99f

Please sign in to comment.