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

Merge pull request #2379 from dotcloud/2377-remove_resize_race-fix

Monitor the tty after starting the container
This commit is contained in:
Michael Crosby 2013-10-24 12:31:31 -07:00
commit e661473bcd

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)