diff options
author | Matthew Holt <[email protected]> | 2017-07-31 17:43:37 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2017-07-31 17:43:37 -0600 |
commit | 65bc696b0c9782f8270caacc6a92fbd2e78deed6 (patch) | |
tree | 235b505f3a8f9c0f89044a8e25f5424cec38eec5 /sigtrap.go | |
parent | e7f08bff38988c3049b7fda301c52a681af63cd8 (diff) | |
download | caddy-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.go | 4 |
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")) + }() } }() } |