Return error and not panic when cannot exec in dockerinit

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 11ef2f0db46b8507007c740300fbf486934aa996
Component: engine
This commit is contained in:
Michael Crosby
2014-01-16 17:55:03 -08:00
parent 282dfddd17
commit 4679c4e1e7

View File

@ -209,7 +209,7 @@ func executeProgram(args *DockerInitArgs) error {
}
if err := syscall.Exec(path, args.args, os.Environ()); err != nil {
panic(err)
return fmt.Errorf("dockerinit unable to execute %s - %s", path, err)
}
// Will never reach here