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

Merge pull request #2788 from jpoimboe/resize-after-start

resize pty after starting
This commit is contained in:
Guillaume J. Charmes 2013-11-20 10:01:59 -08:00
commit 04f1d4dcdb

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