Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
| ... | ... |
@@ -42,7 +42,6 @@ func Exec(container *libcontainer.Container, term Terminal, rootfs, dataPath str |
| 42 | 42 |
command := createCommand(container, console, rootfs, dataPath, os.Args[0], syncPipe.child, args) |
| 43 | 43 |
|
| 44 | 44 |
if err := term.Attach(command); err != nil {
|
| 45 |
- command.Wait() |
|
| 46 | 45 |
return -1, err |
| 47 | 46 |
} |
| 48 | 47 |
defer term.Close() |
| ... | ... |
@@ -28,10 +28,11 @@ func (t *TtyTerminal) Attach(command *exec.Cmd) error {
|
| 28 | 28 |
go io.Copy(t.master, t.stdin) |
| 29 | 29 |
|
| 30 | 30 |
state, err := t.setupWindow(t.master, os.Stdin) |
| 31 |
+ |
|
| 31 | 32 |
if err != nil {
|
| 32 |
- command.Process.Kill() |
|
| 33 | 33 |
return err |
| 34 | 34 |
} |
| 35 |
+ |
|
| 35 | 36 |
t.state = state |
| 36 | 37 |
return err |
| 37 | 38 |
} |