corrected typo in debug statement
added function to copy ISIG and VINTR from pty to stdin (when polling using -W option)