lib/atexit: add SIGTERM to signals which run the exit handlers on unix

This commit is contained in:
Nick Craig-Wood 2019-02-27 22:49:22 +00:00
parent 7267d19ad8
commit fef73763aa
3 changed files with 21 additions and 3 deletions

10
lib/atexit/atexit_unix.go Normal file
View file

@ -0,0 +1,10 @@
//+build !windows,!plan9
package atexit
import (
"os"
"syscall"
)
var exitSignals = []os.Signal{syscall.SIGINT, syscall.SIGTERM} // Not syscall.SIGQUIT as we want the default behaviour