diff --git a/AUTHORS b/AUTHORS index c811de6526..773ad6e4d3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -27,6 +27,7 @@ Daniel Mizyrycki Daniel Robinson Daniel Von Fange Daniel YC Lin +David Calavera David Sissitka Dominik Honnef Don Spaulding diff --git a/commands.go b/commands.go index 7288b58229..b936d68f24 100644 --- a/commands.go +++ b/commands.go @@ -1666,13 +1666,12 @@ func (cli *DockerCli) monitorTtySize(id string) error { } cli.resizeTty(id) - c := make(chan os.Signal, 1) - signal.Notify(c, syscall.SIGWINCH) + sigchan := make(chan os.Signal, 1) + signal.Notify(sigchan, syscall.SIGWINCH) go func() { - for sig := range c { - if sig == syscall.SIGWINCH { - cli.resizeTty(id) - } + for { + <-sigchan + cli.resizeTty(id) } }() return nil