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
1 changed files with 6 additions and 5 deletions

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)