Skip to content

Commit

Permalink
Merge pull request containerd#27 from mlaventure/exec-check-monitor-w…
Browse files Browse the repository at this point in the history
…ait-return

Return an error when an Exec status is not 0
  • Loading branch information
crosbymichael authored Sep 5, 2017
2 parents ba22f6a + 90f5b66 commit b3c048c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runc.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ func (r *Runc) Exec(context context.Context, id string, spec specs.Process, opts
}
}
}
_, err = Monitor.Wait(cmd, ec)
status, err := Monitor.Wait(cmd, ec)
if err == nil && status != 0 {
err = fmt.Errorf("%s did not terminate sucessfully", cmd.Args[0])
}
return err
}

Expand Down

0 comments on commit b3c048c

Please sign in to comment.