Close tty on error before handler
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
4678b01e64
commit
45675581c1
2
utils.go
2
utils.go
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue