Skip to content

Commit 4567558

Browse files
committed
Close tty on error before handler
Signed-off-by: Michael Crosby <[email protected]>
1 parent 4678b01 commit 4567558

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,15 @@ func runProcess(container libcontainer.Container, config *specs.Process, listenF
308308
}
309309

310310
if err := container.Start(process); err != nil {
311+
tty.Close()
311312
return -1, err
312313
}
313314

314315
if pidFile != "" {
315316
if err := createPidFile(pidFile, process); err != nil {
316317
process.Signal(syscall.SIGKILL)
317318
process.Wait()
319+
tty.Close()
318320
return -1, err
319321
}
320322
}

0 commit comments

Comments
 (0)