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

resize pty after starting

Since ptyMaster is created during container start (startPty), it should
resized after starting, not before.
This commit is contained in:
Josh Poimboeuf 2013-11-20 11:27:43 -06:00
parent cd4c1ac356
commit 171d681724

View file

@ -575,6 +575,7 @@ func (cli *DockerCli) CmdStart(args ...string) error {
}
var cErr chan error
var tty bool
if *attach || *openStdin {
if cmd.NArg() > 1 {
return fmt.Errorf("Impossible to start and attach multiple containers at once.")
@ -591,17 +592,13 @@ func (cli *DockerCli) CmdStart(args ...string) error {
return err
}
tty = container.Config.Tty
if !container.Config.Tty {
sigc := cli.forwardAllSignals(cmd.Arg(0))
defer utils.StopCatch(sigc)
}
if container.Config.Tty && cli.isTerminal {
if err := cli.monitorTtySize(cmd.Arg(0)); err != nil {
return err
}
}
var in io.ReadCloser
v := url.Values{}
@ -639,7 +636,13 @@ func (cli *DockerCli) CmdStart(args ...string) error {
}
return encounteredError
}
if *openStdin || *attach {
if tty && cli.isTerminal {
if err := cli.monitorTtySize(cmd.Arg(0)); err != nil {
utils.Errorf("Error monitoring TTY size: %s\n", err)
}
}
return <-cErr
}
return nil