Merge branch 'cleanup_signal_handling' of https://github.com/calavera/docker into calavera-cleanup_signal_handling

This commit is contained in:
Victor Vieux 2013-07-30 11:12:26 +00:00
commit c99e8de5a4
2 changed files with 6 additions and 6 deletions

View file

@ -27,6 +27,7 @@ Daniel Mizyrycki <daniel.mizyrycki@dotcloud.com>
Daniel Robinson <gottagetmac@gmail.com>
Daniel Von Fange <daniel@leancoder.com>
Daniel YC Lin <dlin.tw@gmail.com>
David Calavera <david.calavera@gmail.com>
David Sissitka <me@dsissitka.com>
Dominik Honnef <dominik@honnef.co>
Don Spaulding <donspauldingii@gmail.com>

View file

@ -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