mirror of https://github.com/tidwall/tile38.git
Ignore SIGHUP signals
This commit is contained in:
parent
e05b3dc25c
commit
01112c9a4f
|
@ -291,7 +291,10 @@ Developer Options:
|
|||
|
||||
signal.Notify(c, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
|
||||
go func() {
|
||||
s := <-c
|
||||
for s := range c {
|
||||
if s == syscall.SIGHUP {
|
||||
continue
|
||||
}
|
||||
log.Warnf("signal: %v", s)
|
||||
if pidfile != "" {
|
||||
cleanup()
|
||||
|
@ -299,8 +302,6 @@ Developer Options:
|
|||
switch {
|
||||
default:
|
||||
os.Exit(-1)
|
||||
case s == syscall.SIGHUP:
|
||||
os.Exit(1)
|
||||
case s == syscall.SIGINT:
|
||||
os.Exit(2)
|
||||
case s == syscall.SIGQUIT:
|
||||
|
@ -308,6 +309,7 @@ Developer Options:
|
|||
case s == syscall.SIGTERM:
|
||||
os.Exit(0xf)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
// _____ _ _ ___ ___
|
||||
|
|
Loading…
Reference in New Issue