Commit d3e5f9d4 authored by Matt Holt's avatar Matt Holt Committed by GitHub

Merge pull request #1800 from mholt/exitcodes

Distinguishable exit codes
parents 65bc696b cbb85532
......@@ -33,7 +33,7 @@ func trapSignalsCrossPlatform() {
if PidFile != "" {
os.Remove(PidFile)
}
os.Exit(1)
os.Exit(2)
}
log.Println("[INFO] SIGINT: Shutting down")
......@@ -62,7 +62,7 @@ func executeShutdownCallbacks(signame string) (exitCode int) {
for _, err := range errs {
log.Printf("[ERROR] %s shutdown: %v", signame, err)
}
exitCode = 1
exitCode = 4
}
})
return
......
......@@ -30,7 +30,7 @@ func trapSignalsPosix() {
err := Stop()
if err != nil {
log.Printf("[ERROR] SIGQUIT stop: %v", err)
exitCode = 1
exitCode = 3
}
if PidFile != "" {
os.Remove(PidFile)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment