Skip to content

Commit

Permalink
Switch from SIGWINCH to SIGUSR2 for graceful shutdown + pause
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Buch committed Oct 16, 2017
1 parent b1e3a6b commit 3ba889b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func (i *CLI) signalHandler() {
signal.Notify(signalChan,
syscall.SIGTERM, syscall.SIGINT, syscall.SIGUSR1,
syscall.SIGTTIN, syscall.SIGTTOU,
syscall.SIGWINCH)
syscall.SIGUSR2)

for {
select {
Expand All @@ -508,8 +508,8 @@ func (i *CLI) signalHandler() {
case syscall.SIGTTOU:
i.logger.Info("SIGTTOU received, removing processor from pool")
i.ProcessorPool.Decr()
case syscall.SIGWINCH:
i.logger.Warn("SIGWINCH received, toggling graceful shutdown and pause")
case syscall.SIGUSR2:
i.logger.Warn("SIGUSR2 received, toggling graceful shutdown and pause")
i.ProcessorPool.GracefulShutdown(true)
case syscall.SIGUSR1:
i.logProcessorInfo("received SIGUSR1")
Expand Down

0 comments on commit 3ba889b

Please sign in to comment.