Merge pull request #549 from crosbymichael/tty-close
Close tty on error before handler
This commit is contained in:
commit
1a124e9c2d
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 {
|
if err := container.Start(process); err != nil {
|
||||||
|
tty.Close()
|
||||||
return -1, err
|
return -1, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,6 +316,7 @@ func runProcess(container libcontainer.Container, config *specs.Process, listenF
|
||||||
if err := createPidFile(pidFile, process); err != nil {
|
if err := createPidFile(pidFile, process); err != nil {
|
||||||
process.Signal(syscall.SIGKILL)
|
process.Signal(syscall.SIGKILL)
|
||||||
process.Wait()
|
process.Wait()
|
||||||
|
tty.Close()
|
||||||
return -1, err
|
return -1, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue