From bdfe8ed403591022ac46371798783c7bbe6134c9 Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Wed, 27 Nov 2013 23:14:34 -0500 Subject: [PATCH] Remove incorrect SIGKILL handler. As per POSIX signal handling SIGKILL does not work. Fixes #2928 --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 3641e2fdc8..476890ee06 100644 --- a/server.go +++ b/server.go @@ -38,7 +38,7 @@ func init() { // 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. -// 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 { job.Logf("Creating server") srv, err := NewServer(job.Eng, ConfigFromJob(job)) @@ -53,7 +53,7 @@ func jobInitApi(job *engine.Job) string { } job.Logf("Setting up signal traps") 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() { sig := <-c log.Printf("Received signal '%v', exiting\n", sig)