mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update lxc to use cmd.Wait()
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
b9de22e828
commit
5310e8575f
1 changed files with 3 additions and 1 deletions
|
@ -167,6 +167,7 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
|
|||
waitErr error
|
||||
waitLock = make(chan struct{})
|
||||
)
|
||||
|
||||
go func() {
|
||||
if err := c.Wait(); err != nil {
|
||||
if _, ok := err.(*exec.ExitError); !ok { // Do not propagate the error if it's simply a status code != 0
|
||||
|
@ -181,10 +182,11 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
|
|||
if err != nil {
|
||||
if c.Process != nil {
|
||||
c.Process.Kill()
|
||||
c.Process.Wait()
|
||||
c.Wait()
|
||||
}
|
||||
return -1, err
|
||||
}
|
||||
|
||||
c.ContainerPid = pid
|
||||
|
||||
if startCallback != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue