From e94c4801a60cb3736fece3655d7bf16d3f7bc9af Mon Sep 17 00:00:00 2001 From: Sally O'Malley Date: Wed, 29 Jul 2015 08:21:16 -0400 Subject: [PATCH] Change 'docker run' exit codes to distinguish docker/contained errors The purpose of this PR is for users to distinguish Docker errors from contained command errors. This PR modifies 'docker run' exit codes to follow the chroot standard for exit codes. Exit status: 125 if 'docker run' itself fails 126 if contained command cannot be invoked 127 if contained command cannot be found the exit status otherwise Signed-off-by: Sally O'Malley --- mflag/flag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mflag/flag.go b/mflag/flag.go index 6a113b9..43fd305 100644 --- a/mflag/flag.go +++ b/mflag/flag.go @@ -1102,7 +1102,7 @@ func (fs *FlagSet) Parse(arguments []string) error { case ContinueOnError: return err case ExitOnError: - os.Exit(2) + os.Exit(125) case PanicOnError: panic(err) }