def setwinsize(self, r, c):
<EOL>TIOCSWINSZ = getattr(termios, '<STR_LIT>', -<NUM_LIT>)<EOL>if TIOCSWINSZ == <NUM_LIT>: <EOL><INDENT>TIOCSWINSZ = -<NUM_LIT> <EOL><DEDENT>s = struct.pack('<STR_LIT>', r, c, <NUM_LIT:0>, <NUM_LIT:0>)<EOL>fcntl.ioctl(self.fileno(), TIOCSWINSZ, s)<EOL>
This sets the terminal window size of the child tty. This will cause
        a SIGWINCH signal to be sent to the child. This does not change the
        physical window size. It changes the size reported to TTY-aware
        applications like vi or curses -- applications that respond to the
        SIGWINCH signal.