From 2e13cf5f748ff3c8146dee6dce4694b1bc4508cd Mon Sep 17 00:00:00 2001 From: Marco Molteni Date: Tue, 20 Apr 2021 14:54:24 +0200 Subject: [PATCH 1/2] gitignore more editors --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a5e9f0e4..6d5b8eab 100644 --- a/.gitignore +++ b/.gitignore @@ -19,8 +19,9 @@ dist/ .DS_Store -# intellij idea/goland +# editors .idea/ +.vscode/ # exuberant ctags tags From 837fb71a246a4507d28bd640c54663546a280259 Mon Sep 17 00:00:00 2001 From: Marco Molteni Date: Tue, 20 Apr 2021 14:57:23 +0200 Subject: [PATCH 2/2] 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