Run() should watch for SIGTERM on POSIX platforms

This commit is contained in:
Rob Napier
2015-03-13 15:53:26 -04:00
parent f4d161372a
commit 34797be7d7
4 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import (
"os"
"os/exec"
"os/signal"
"syscall"
"text/template"
"time"
@@ -131,7 +132,7 @@ func (s *sysv) Run() (err error) {
sigChan := make(chan os.Signal, 3)
signal.Notify(sigChan, os.Interrupt, os.Kill)
signal.Notify(sigChan, syscall.SIGTERM, os.Interrupt, os.Kill)
<-sigChan