Sfoglia il codice sorgente

Exit after receiving SIGTERM

Signed-off-by: Michael Crosby <michael@docker.com>
Michael Crosby 11 anni fa
parent
commit
cdf8a55670
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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 {
 							// Call cleanup handler
 							cleanup()
+							os.Exit(0)
 						} else {
 							return
 						}