Problem with StandardOutput stream in async mode.

Posted by JF on Stack Overflow See other posts from Stack Overflow or by JF
Published on 2010-02-25T19:58:19Z Indexed on 2010/04/30 1:57 UTC
Read the original article Hit count: 381

Filed under:
|
|

Hi everyone.

I have a program that launches command line processes in async mode, using BeginOutputReadLine. My problem is that the .Exited event is triggered when there is still some .OutputDataReceived events being triggered. What I do in my .Exited event must happen only once all my .OutputDataReceived events are done, or I'll be missing some output.

I looked in the Process class to see if anything could be useful to me, as to wait for the stream to be empty, but all I find is for sync mode only. Can any of you help?

Thanx.

© Stack Overflow or respective owner

Related posts about redirectstandardoutput

Related posts about events