libcontainer/nsinit: remove Wait call from Exec and Kill from Attach in tty_term.go
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
This commit is contained in:
parent
40b9c5564f
commit
e0b1546d8b
|
@ -42,7 +42,6 @@ func Exec(container *libcontainer.Container, term Terminal, rootfs, dataPath str
|
|||
command := createCommand(container, console, rootfs, dataPath, os.Args[0], syncPipe.child, args)
|
||||
|
||||
if err := term.Attach(command); err != nil {
|
||||
command.Wait()
|
||||
return -1, err
|
||||
}
|
||||
defer term.Close()
|
||||
|
|
|
@ -28,10 +28,11 @@ func (t *TtyTerminal) Attach(command *exec.Cmd) error {
|
|||
go io.Copy(t.master, t.stdin)
|
||||
|
||||
state, err := t.setupWindow(t.master, os.Stdin)
|
||||
|
||||
if err != nil {
|
||||
command.Process.Kill()
|
||||
return err
|
||||
}
|
||||
|
||||
t.state = state
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue