Skip to content

Commit

Permalink
fix: exit with nohup (#106) (#119)
Browse files Browse the repository at this point in the history
Co-authored-by: Vee Zhang <[email protected]>
  • Loading branch information
github-actions[bot] and veezhang authored May 24, 2022
1 parent 7011959 commit bf3266e
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 bf3266e

Please sign in to comment.