Skip to content

Commit

Permalink
Update restart exit code in pmctl
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Apr 24, 2020
1 parent d89b612 commit 3b0d60b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pmctl/run.go
Expand Up @@ -17,6 +17,10 @@ import (
"github.com/tevino/abool"
)

const (
restartCode = 23
)

var (
runningInConsole bool
onWindows = runtime.GOOS == "windows"
Expand Down Expand Up @@ -375,7 +379,7 @@ func execute(opts *Options, args []string) (cont bool, err error) {
case 1:
// error exit
return true, fmt.Errorf("error during execution: %s", err)
case 2357427: // Leet Speak for "restart"
case restartCode:
// restart request
log.Printf("restarting %s\n", opts.Identifier)
return true, nil
Expand Down

0 comments on commit 3b0d60b

Please sign in to comment.