瀏覽代碼

Exit after receiving SIGTERM

Signed-off-by: Michael Crosby <michael@docker.com>
Michael Crosby 11 年之前
父節點
當前提交
cdf8a55670
共有 1 個文件被更改,包括 1 次插入0 次删除
  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
 						}