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:
Erik Hollensbe 2014-05-27 12:25:27 -07:00
parent 40b9c5564f
commit e0b1546d8b
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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
}