mirror of
https://github.com/go-task/task.git
synced 2025-03-17 21:08:01 +02:00
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)
This commit is contained in:
parent
2e13cf5f74
commit
837fb71a24
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user