I am grateful to both Rob Pendleton (who wrote the original version of ILE - the Input Line Editor) and Charles Blake (who modified it to provide the Linux version). It was from the example of their program that I figured out how to do the pty/tty and SIGWINCH code, making this program possible. Thanks guys.