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:
commit
05ddfc0495
3
.gitignore
vendored
3
.gitignore
vendored
@ -19,8 +19,9 @@ dist/
|
||||
|
||||
.DS_Store
|
||||
|
||||
# intellij idea/goland
|
||||
# editors
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
# exuberant ctags
|
||||
tags
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user