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:
commit
e661473bcd
1 changed files with 6 additions and 5 deletions
11
commands.go
11
commands.go
|
@ -1623,11 +1623,6 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
hijacked := make(chan bool)
|
hijacked := make(chan bool)
|
||||||
|
|
||||||
if config.AttachStdin || config.AttachStdout || config.AttachStderr {
|
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 := url.Values{}
|
||||||
v.Set("stream", "1")
|
v.Set("stream", "1")
|
||||||
|
@ -1671,6 +1666,12 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
return err
|
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 errCh != nil {
|
||||||
if err := <-errCh; err != nil {
|
if err := <-errCh; err != nil {
|
||||||
utils.Debugf("Error hijack: %s", err)
|
utils.Debugf("Error hijack: %s", err)
|
||||||
|
|
Loading…
Reference in a new issue