I'm trying to write a tool that will send and receive messages over ssh by running `ssh foo@bar 'my-tool --server'`, getting the `stdin` and `stdout` handles, and then communicating via these handles. Before I do that, I'm trying to write a simpler tool that will send a message to `echo` and receive it back. ``` main = do (Just hin, Just hout, _, _) <- createProcess (proc "/usr/bin/echo" []) {std_in = CreatePipe, std_out = CreatePipe} hSetBuffering hin LineBuffering hSetBuffering hout LineBuffering forkIO $ getMessages hin sendMessages hout ``` This fails with ``` sesh: fd:4: hGetLine: illegal operation (handle is not open for reading) sesh: fd:5: hPutStr: illegal operation (handle is not open for writing) ```