Skip to content

Commit

Permalink
dexc-desktop: catch os.Interrupt signal and shutdown gracefully
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <[email protected]>
  • Loading branch information
ukane-philemon committed May 23, 2023
1 parent 34d9ffd commit d7ff332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/cmd/dexc-desktop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func mainCore() error {
// not well documented. Test to verify. Could also catch SIGKILL, which is
// sent after a configured timeout if the program doesn't exit on SIGTERM.
killChan := make(chan os.Signal, 1)
signal.Notify(killChan, syscall.SIGINT /* ctrl-c */, syscall.SIGTERM /* system shutdown */)
signal.Notify(killChan, os.Interrupt /* ctrl-c */, syscall.SIGTERM /* system shutdown */)
go func() {
for range killChan {
log.Infof("Shutting down...")
Expand Down

0 comments on commit d7ff332

Please sign in to comment.