Set the tty winsize for file descriptor fd. The winsize to be set is taken from the winsize argument, which is a two-item tuple (ws_row, ws_col) like the one returned by tcgetwinsize().
termios/tcsetwinsize
tcsetwinsize