Pass terminal I/O between the subprocess and stdin/stdout.

The next step is to stick a header on to the data and pass it between
the subprocess and a socket. Then code needs to be written to handle
the socket code.