mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Close tty on error before handler
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user