Skip to content

Commit

Permalink
fix: exit with nohup (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
veezhang authored May 16, 2022
1 parent 0eeba2d commit fed3b01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ func main() {
*/
done := make(chan bool, 1)
quit := make(chan os.Signal, 1)
signal.Notify(quit, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
if !signal.Ignored(syscall.SIGHUP) {
signal.Notify(quit, syscall.SIGHUP)
}

go func() {
<-quit
Expand Down

0 comments on commit fed3b01

Please sign in to comment.