Skip to content

Commit

Permalink
fix: exit with nohup (#106) (#118)
Browse files Browse the repository at this point in the history
Co-authored-by: Vee Zhang <veezhang@126.com>
  • Loading branch information
github-actions[bot] and veezhang authored May 24, 2022
1 parent 0649a57 commit a499f2f
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 @@ -64,7 +64,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 a499f2f

Please sign in to comment.