Fix bugs in <termios.h>; add basic pty functionality

7 files changed