From 837fb71a246a4507d28bd640c54663546a280259 Mon Sep 17 00:00:00 2001 From: Marco Molteni Date: Tue, 20 Apr 2021 14:57:23 +0200 Subject: [PATCH] signals: do not try to catch uncatchable signals os.Kill is SIGKILL (kill -9), cannot be intercepted. (see https://github.com/golang/go/issues/13080) --- cmd/task/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/task/task.go b/cmd/task/task.go index 11d7ffab..9fe158df 100644 --- a/cmd/task/task.go +++ b/cmd/task/task.go @@ -208,7 +208,7 @@ func getArgs() (tasksAndVars, cliArgs []string) { func getSignalContext() context.Context { ch := make(chan os.Signal, 1) - signal.Notify(ch, os.Interrupt, os.Kill, syscall.SIGTERM) + signal.Notify(ch, os.Interrupt, syscall.SIGTERM) ctx, cancel := context.WithCancel(context.Background()) go func() { sig := <-ch