signal: do not trap SIGABRT

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.
This commit is contained in:
Matheus Degiovani 2020-09-17 12:27:40 -03:00
parent ae7d69838e
commit 38c74f6418
No known key found for this signature in database
GPG Key ID: 60AC5E69F376D6E6

@ -42,7 +42,6 @@ func Intercept() error {
signalsToCatch := []os.Signal{ signalsToCatch := []os.Signal{
os.Interrupt, os.Interrupt,
os.Kill, os.Kill,
syscall.SIGABRT,
syscall.SIGTERM, syscall.SIGTERM,
syscall.SIGQUIT, syscall.SIGQUIT,
} }