Whenever I sit down to write a program I know that I will do something wrong. Generally that doesn't stop me from coding something that works, but in this case it has. I open an input and an output stream from osproc's StartProcess. In the input stream I send a series of instructions. With the output stream I receive the responses to those. The only thing is that the stream eventually breaks down, it locks and no exception appears to be thrown.
I used IsNil and AtEnd to check that I should be able to receive the expected output, but they never show any problem before my program hangs.
My program always seems to hang in the same place (at the same instruction - which happens to be ply 80) That suggests to me that the stream has run out of space, else why would it repeatedly fail in the same place. The exe file I am communicating is unlikely to behave like that.
Should I be wrapping Streams in some other more robust or durable variant?