def _signal_winch(self, signum, frame):
if self.set_pty_size is not None:
buf = array.array('h', [0, 0, 0, 0])
fcntl.ioctl(pty.STDOUT_FILENO, termios.TIOCGWINSZ, buf, True)
self.set_pty_size(buf[0], buf[1], buf[2], buf[3])
评论列表
文章目录