Subprocess in C# Application pauses unexpected
<p>I'm currently working on a service (well at this point it's still a Console Application, as this is a lot easier to debug). The basic task of this service is to watch a folder for new *.tif Files. As soon as the Application found a .TIF file in the folder it starts another Application with the following code:</p>

<pre><code>ProcessStartInfo command = new ProcessStartInfo(commandPath, commandParams);
command.RedirectStandardOutput=true;
command.UseShellExecute=false;
command.CreateNoWindow=true;

Process process = new Process();
process.startInfo = command;
process.Start();
process.WaitForExit();
</code></pre>

<p>This console application then uses IrfanView to split the Multipage-TIF into multiple singlepage-TIF (I use basically the same code as above to do this). After that, I check for a Barcode on the Scanned image (with zxing library). The found Barcode is then compared to the Oracle Database. Afterwards the file is converted to PDF and moved to a specific location, based on the found Barcode.</p>

<p>This console Application works perfectly, when I start it myself, but as soon as the "service" starts it, it will pause after a while and don't do anything until I close the "service"-console application. Then it finishes normally.</p>

<p>What could be the problem?</p>

<p>I tried to disable the Oracle, DB check and it worked. Afterwards I disabled my Logging class and it worked too. So my guess is, that I somehow use too much ressources or something like that. But where to start?</p>

<p><strong>EDIT:</strong>
Some additional information. I just debugged the process, as VS is able to attach to a process to debug. The command that hangs is Console.WriteLine (called from within the Console application which is called by my "service" console. Any way that a console in a subprocess can only have a certain amount of lines/chars? can a console-output stream have a deadlock or what is this?</p>
