Merge pull request #2929 from pnasrat/2928-fix-signal-handling

Remove incorrect SIGKILL handler.
This commit is contained in:
Guillaume J. Charmes 2013-11-29 14:10:46 -08:00
commit 0d3f4017cf
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ func init() {
// jobInitApi runs the remote api server `srv` as a daemon, // jobInitApi runs the remote api server `srv` as a daemon,
// Only one api server can run at the same time - this is enforced by a pidfile. // Only one api server can run at the same time - this is enforced by a pidfile.
// The signals SIGINT, SIGKILL and SIGTERM are intercepted for cleanup. // The signals SIGINT and SIGTERM are intercepted for cleanup.
func jobInitApi(job *engine.Job) string { func jobInitApi(job *engine.Job) string {
job.Logf("Creating server") job.Logf("Creating server")
srv, err := NewServer(job.Eng, ConfigFromJob(job)) srv, err := NewServer(job.Eng, ConfigFromJob(job))
@ -53,7 +53,7 @@ func jobInitApi(job *engine.Job) string {
} }
job.Logf("Setting up signal traps") job.Logf("Setting up signal traps")
c := make(chan os.Signal, 1) c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, os.Kill, os.Signal(syscall.SIGTERM)) signal.Notify(c, os.Interrupt, os.Signal(syscall.SIGTERM))
go func() { go func() {
sig := <-c sig := <-c
log.Printf("Received signal '%v', exiting\n", sig) log.Printf("Received signal '%v', exiting\n", sig)