Fix bug where we hang trying to do an ioctl(pty, TIOCSETP, ...).