Skip to content

Commit

Permalink
Add force quit
Browse files Browse the repository at this point in the history
  • Loading branch information
NHAS committed Apr 27, 2024
1 parent f5ea845 commit c99dcff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions commands/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ func (g *start) Run() error {
signal.Notify(cancel, syscall.SIGTERM, syscall.SIGINT, os.Interrupt, syscall.SIGQUIT)

s := <-cancel
go func(chan os.Signal) {
<-cancel
log.Println("got force quit, killing without exiting nicely")
os.Exit(1)
}(cancel)

log.Printf("Got signal %s gracefully exiting\n", s)

Expand Down

0 comments on commit c99dcff

Please sign in to comment.