diff --git a/sigtrap.go b/sigtrap.go index 185631bd..58d199c9 100644 --- a/sigtrap.go +++ b/sigtrap.go @@ -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 diff --git a/sigtrap_posix.go b/sigtrap_posix.go index e046bee9..54cbebcb 100644 --- a/sigtrap_posix.go +++ b/sigtrap_posix.go @@ -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)