Skip to content

Commit

Permalink
Fix force quit using SIGINT
Browse files Browse the repository at this point in the history
Only the outside function call is executed in a new goroutine when
invoking 'go'. Oops. Force quits (2 SIGINTs) now work again.
  • Loading branch information
mholt committed Jul 31, 2017
1 parent e7f08bf commit 65bc696
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sigtrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ func trapSignalsCrossPlatform() {
os.Remove(PidFile)
}

go os.Exit(executeShutdownCallbacks("SIGINT"))
go func() {
os.Exit(executeShutdownCallbacks("SIGINT"))
}()
}
}()
}
Expand Down

0 comments on commit 65bc696

Please sign in to comment.