From 477bf96f337401d000ee3e445c85df1a3ecad3ac Mon Sep 17 00:00:00 2001 From: mpl Date: Sat, 17 Aug 2013 00:33:59 +0200 Subject: [PATCH] devcam server: handle SIGQUIT Somehow forgot last patch when doing http://camlistore.org/r/452 Change-Id: I10841ebff29689af19773e8f9d99c5c16659cfc1 --- dev/devcam/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/devcam/server.go b/dev/devcam/server.go index 4428ffd0a..ef038b02c 100644 --- a/dev/devcam/server.go +++ b/dev/devcam/server.go @@ -317,7 +317,7 @@ func (c *serverCmd) setFullClosure() error { func handleKillCamliSignal(camliProc *os.Process) { c := make(chan os.Signal, 1) - signal.Notify(c, syscall.SIGTERM, syscall.SIGINT) + signal.Notify(c, syscall.SIGTERM, syscall.SIGINT, syscall.SIGQUIT) for { sig := <-c sysSig, ok := sig.(syscall.Signal) @@ -325,8 +325,8 @@ func handleKillCamliSignal(camliProc *os.Process) { log.Fatal("Not a unix signal") } switch sysSig { - case syscall.SIGTERM, syscall.SIGINT: - log.Print("Received kill signal, terminating.") + case syscall.SIGTERM, syscall.SIGINT, syscall.SIGQUIT: + log.Printf("Received %v signal, terminating.", sig) err := camliProc.Kill() if err != nil { log.Fatalf("Failed to kill camli: %v ", err)