osutil: force SIG_DFL before resending terminating signal
The go runtime won't always reinstall the default signal handler on the SIGTERM path, so it's possible the signal won't terminate the process. Instead, force SIG_DFL for the signal.
This commit is contained in:
@ -68,6 +68,7 @@ func HandleInterrupts() {
|
||||
if pid == 1 {
|
||||
os.Exit(0)
|
||||
}
|
||||
setDflSignal(sig.(syscall.Signal))
|
||||
syscall.Kill(pid, sig.(syscall.Signal))
|
||||
}()
|
||||
}
|
||||
|
Reference in New Issue
Block a user