code: func MonitorTtySize(ctx context.Context, cli command.Cli, id string, isExec bool) error {
  	initTtySize(ctx, cli, id, isExec, resizeTty)
  	if runtime.GOOS == "windows" {
  		go func() {
  			prevH, prevW := cli.Out().GetTtySize()
  			for {
  				time.Sleep(time.Millisecond * 250)
  				h, w := cli.Out().GetTtySize()
  
  				if prevW != w || prevH != h {
  					resizeTty(ctx, cli, id, isExec)
  				}
  				prevH = h
  				prevW = w
  			}
  		}()
  	} else {
  		sigchan := make(chan os.Signal, 1)
  		gosignal.Notify(sigchan, signal.SIGWINCH)
  		go func() {
  			for range sigchan {
  				resizeTty(ctx, cli, id, isExec)
  			}
  		}()
  	}
  	return nil
  }
docs: // MonitorTtySize updates the container tty size when the terminal tty changes size