Return errors from shim in log

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-03-17 14:37:26 -07:00
parent 366dcc08fa
commit 6ba5767b70
3 changed files with 50 additions and 30 deletions

View file

@ -134,6 +134,11 @@ func (p *process) start() error {
Pdeathsig: syscall.SIGKILL,
}
if err := cmd.Start(); err != nil {
if exErr, ok := err.(*exec.Error); ok {
if exErr.Err == exec.ErrNotFound || exErr.Err == os.ErrNotExist {
return fmt.Errorf("runc not installed on system")
}
}
return err
}
p.stdio.stdout.Close()