def start(self):
"""Start
Start trapping WINCH signals and resizing the PTY.
This method saves the previous WINCH handler so it can be restored on
`stop()`.
"""
def handle(signum, frame):
if signum == signal.SIGWINCH:
LOG.debug("Send command to resize the tty session")
self.client.handle_resize()
self.original_handler = signal.signal(signal.SIGWINCH, handle)
评论列表
文章目录