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 <somalley@redhat.com>
This commit is contained in:
Sally O'Malley 2015-07-29 08:21:16 -04:00
parent 9f0f24ea63
commit e94c4801a6

View file

@ -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)
}