mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 10:55:42 +03:00
fix: make teh disctintion when for os.Interrupt
This commit is contained in:
@@ -1039,12 +1039,19 @@ func (c *Command) handleSignals() int {
|
||||
c.Ui.Output("Terminal error found while reloading")
|
||||
return 1
|
||||
}
|
||||
|
||||
sdNotify(sdSock, sdReady)
|
||||
case os.Interrupt, syscall.SIGTERM:
|
||||
case syscall.SIGTERM:
|
||||
if !c.agent.GetConfig().LeaveOnTerm {
|
||||
return 1
|
||||
}
|
||||
|
||||
return c.terminateGracefully(signalCh, sdSock)
|
||||
case os.Interrupt:
|
||||
if !c.agent.GetConfig().LeaveOnInt {
|
||||
return 1
|
||||
}
|
||||
|
||||
return c.terminateGracefully(signalCh, sdSock)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user