1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

monitor the tty after starting the container

This commit is contained in:
Victor Vieux 2013-10-24 11:19:06 -07:00
parent 489c370fcc
commit 656b66e51b

View file

@ -1623,11 +1623,6 @@ func (cli *DockerCli) CmdRun(args ...string) error {
hijacked := make(chan bool)
if config.AttachStdin || config.AttachStdout || config.AttachStderr {
if config.Tty {
if err := cli.monitorTtySize(runResult.ID); err != nil {
utils.Errorf("Error monitoring TTY size: %s\n", err)
}
}
v := url.Values{}
v.Set("stream", "1")
@ -1671,6 +1666,12 @@ func (cli *DockerCli) CmdRun(args ...string) error {
return err
}
if (config.AttachStdin || config.AttachStdout || config.AttachStderr) && config.Tty {
if err := cli.monitorTtySize(runResult.ID); err != nil {
utils.Errorf("Error monitoring TTY size: %s\n", err)
}
}
if errCh != nil {
if err := <-errCh; err != nil {
utils.Debugf("Error hijack: %s", err)