summaryrefslogtreecommitdiffhomepage
path: root/sigtrap.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2017-07-31 17:43:37 -0600
committerMatthew Holt <[email protected]>2017-07-31 17:43:37 -0600
commit65bc696b0c9782f8270caacc6a92fbd2e78deed6 (patch)
tree235b505f3a8f9c0f89044a8e25f5424cec38eec5 /sigtrap.go
parente7f08bff38988c3049b7fda301c52a681af63cd8 (diff)
downloadcaddy-65bc696b0c9782f8270caacc6a92fbd2e78deed6.tar.gz
caddy-65bc696b0c9782f8270caacc6a92fbd2e78deed6.zip
Fix force quit using SIGINT
Only the outside function call is executed in a new goroutine when invoking 'go'. Oops. Force quits (2 SIGINTs) now work again.
Diffstat (limited to 'sigtrap.go')
-rw-r--r--sigtrap.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/sigtrap.go b/sigtrap.go
index a456434bb..185631bdf 100644
--- a/sigtrap.go
+++ b/sigtrap.go
@@ -42,7 +42,9 @@ func trapSignalsCrossPlatform() {
os.Remove(PidFile)
}
- go os.Exit(executeShutdownCallbacks("SIGINT"))
+ go func() {
+ os.Exit(executeShutdownCallbacks("SIGINT"))
+ }()
}
}()
}