Skip to content

Commit

Permalink
Update doc of UntilInterrupted() for SIGTERM/k8s (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly authored Feb 13, 2024
1 parent 581a3cf commit 82af3a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scli.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ func ServerMain() bool {
return hasStartedServer
}

// UntilInterrupted runs forever or until interrupted (ctrl-c or shutdown signal (kill -INT)).
// UntilInterrupted runs forever or until interrupted (ctrl-c or shutdown signal (kill -INT or -TERM)).
// Kubernetes for instance sends a SIGTERM before killing a pod.
// You can place your clean shutdown code after this call in the main().
func UntilInterrupted() {
// listen for interrupt signal
c := make(chan os.Signal, 1)
Expand Down

0 comments on commit 82af3a1

Please sign in to comment.