1
0
mirror of https://github.com/go-task/task.git synced 2025-03-17 21:08:01 +02:00

Merge pull request #476 from Pix4D/fix-os-kill

signals: do not try to catch uncatchable signals
This commit is contained in:
Andrey Nering 2021-04-23 17:45:56 -03:00 committed by GitHub
commit 05ddfc0495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

3
.gitignore vendored
View File

@ -19,8 +19,9 @@ dist/
.DS_Store
# intellij idea/goland
# editors
.idea/
.vscode/
# exuberant ctags
tags

View File

@ -209,7 +209,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