Skip to content

Commit

Permalink
signal: do not trap SIGABRT
Browse files Browse the repository at this point in the history
SIGABRT is used by the Go runtime to forcefully terminate all
goroutines, even if they are in a deadlocked state.

It is useful in development (to get a glimpse of any potential race or
hang conditions) and in production to forcefully terminate execution
when a standard SIGQUIT won't do.

This modifies the signal package to _not_ trap SIGABRT and let it be
handled in the standard way by the runtime.
  • Loading branch information
matheusd committed Sep 17, 2020
1 parent ae7d698 commit 38c74f6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion signal/signal.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func Intercept() error {
signalsToCatch := []os.Signal{
os.Interrupt,
os.Kill,
syscall.SIGABRT,
syscall.SIGTERM,
syscall.SIGQUIT,
}
Expand Down

0 comments on commit 38c74f6

Please sign in to comment.