Skip to content

Commit

Permalink
fix: exit with nohup (#106) (#117)
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 committed May 24, 2022
1 parent 316a5f6 commit e35b31a
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 e35b31a

Please sign in to comment.