Reading from a pty after slave exited