By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,052 Members | 1,303 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,052 IT Pros & Developers. It's quick & easy.

WaitForExit( 1 ) never returns

P: n/a
Hi All

I am writing a C# program that starts another program. Since this is
destined to run on an un-attended PC, I want to be certain that my program
can regain control. To this end, I use the WaitForExit methos with a

So in order to test this, I added an endless loop to the other program such
that it never returns. My problem is that neither does WaitForExit. Even
WaitForExit( 1 ) never returns when the other program hangs.

Why? And what should I do to make it work?

Oct 2 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Ebbe Kristensen wrote:
Why? And what should I do to make it work?
Never mind - it turned out that using MyProccess.StandardError.ReadToEnd()
was the culprit. Changing that to asynchroneous collection solved the

Oct 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.