Merge branch 'cleanup_signal_handling' of https://github.com/calavera/docker into calavera-cleanup_signal_handling
This commit is contained in:
commit
c99e8de5a4
2 changed files with 6 additions and 6 deletions
1
AUTHORS
1
AUTHORS
|
@ -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>
|
||||
|
|
11
commands.go
11
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
|
||||
|
|
Loading…
Reference in a new issue