Merge pull request #549 from crosbymichael/tty-close

Close tty on error before handler
This commit is contained in:
Alexander Morozov 2016-02-10 14:11:47 -08:00
commit 1a124e9c2d
1 changed files with 2 additions and 0 deletions

View File

@ -308,6 +308,7 @@ func runProcess(container libcontainer.Container, config *specs.Process, listenF
}
if err := container.Start(process); err != nil {
tty.Close()
return -1, err
}
@ -315,6 +316,7 @@ func runProcess(container libcontainer.Container, config *specs.Process, listenF
if err := createPidFile(pidFile, process); err != nil {
process.Signal(syscall.SIGKILL)
process.Wait()
tty.Close()
return -1, err
}
}