Explorar o código

Merge pull request #7568 from crosbymichael/replace-7240

Exit after receiving SIGTERM
Michael Crosby %!s(int64=11) %!d(string=hai) anos
pai
achega
33fa175abf
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      pkg/signal/trap.go

+ 1 - 0
pkg/signal/trap.go

@@ -38,6 +38,7 @@ func Trap(cleanup func()) {
 						if atomic.LoadUint32(&interruptCount) == 1 {
 						if atomic.LoadUint32(&interruptCount) == 1 {
 							// Call cleanup handler
 							// Call cleanup handler
 							cleanup()
 							cleanup()
+							os.Exit(0)
 						} else {
 						} else {
 							return
 							return
 						}
 						}