views:

12

answers:

1

I've got a C# application which launches a console application in a separate process. The two applications communicate via a TCP connection, as well as some (limited) standard input/output. The problem I'm experiencing is that whenever I "break" within the debugger, it seems to cause the console application to hang. If I leave the applications alone, both work just fine, and there appear to be no problems in the interaction between them.

My research so far seems to indicate that I might be hitting a deadlock condition, due to the output buffers being filled. How can I verify that this is indeed the case? Are there any other explanations for what would be causing this problem?

+1  A: 

If you suspect a call is blocking somewhere, you could try to see if there's an asynchronous version (with a callback); or otherwise, manually launch it inside a thread, and then have the main thread sleep in a loop until some timeout; and throw an exception if it doesn't complete until then.

tzaman
Going asynchronous where I could (easily) do so appears to have fixed the problem.
TreDubZedd