From 82b63e86e0b09d7fd58d72978f4c5f599e770a71 Mon Sep 17 00:00:00 2001 From: Viren Negi Date: Fri, 7 Aug 2020 15:49:13 +0530 Subject: [PATCH] We can't really handle SIGKILL so removing it. --- signals/signals.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/signals/signals.go b/signals/signals.go index feecaad6a..792653714 100644 --- a/signals/signals.go +++ b/signals/signals.go @@ -21,8 +21,8 @@ func Handle() chan struct{} { return HandleWithInterrupt(nil) } -// HandleWithInterrupt starts a goroutine which listens for SIGTERM, SIGINT, and -// SIGKILL and explicitly ignores SIGPIPE. It calls the finalizer function when +// HandleWithInterrupt starts a goroutine which listens for SIGTERM and SIGINT, and +// explicitly ignores SIGPIPE. It calls the finalizer function when // the first signal is received and forcibly terminates the program after the // second. If a nil function is provided, the program will exit after the first // signal. @@ -37,9 +37,9 @@ func handleSignals(finalizer func(), finishedChan chan struct{}) { noopChan := make(chan os.Signal) signal.Notify(noopChan, syscall.SIGPIPE) - log.Logv(log.DebugLow, "will listen for SIGTERM, SIGINT, and SIGKILL") + log.Logv(log.DebugLow, "will listen for SIGTERM and SIGINT") sigChan := make(chan os.Signal, 2) - signal.Notify(sigChan, syscall.SIGTERM, syscall.SIGINT, syscall.SIGKILL) + signal.Notify(sigChan, syscall.SIGTERM, syscall.SIGINT) defer signal.Stop(sigChan) if finalizer != nil { select {