lazydocker/pkg/commands/streamer/streamer_unix.go
2022-05-14 12:44:00 +10:00

22 lines
395 B
Go

//go:build !windows
// +build !windows
package streamer
import (
"context"
"os"
"os/signal"
"syscall"
)
func (s *Streamer) monitorTtySize(ctx context.Context, resize ResizeContainer, id string) {
s.initTtySize(ctx, resize, id)
sigchan := make(chan os.Signal, 1)
signal.Notify(sigchan, syscall.SIGWINCH)
go func() {
for range sigchan {
_ = s.resizeTty(ctx, resize, id)
}
}()
}