in reply to parsing the results of the subroutine in real time

What about just opening the file your executable is writing into, quickly grabbing its contents and closing the file? You can then at leisure parse the contents you grabbed.

You may run into some problems if your executable maintains all the time an exclusive lock on the file, but if that is not the case, it should work.

Yes, it may be that you are reading at the exact moment the executable is writing to the file and you get only partial input. Your parsing routines should cater for such eventuality by somehow validating the data being parsed. How to do that is difficult to say as we do not know what kind of data in what kind of format is being written by your executable.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: parsing the results of the subroutine in real time