If I have code such as
proc.Start();
string resultOut;
while ( (!proc.HasExited && (resultOut = stdOut.ReadLine()) != null))
{
// Do some operation based on resultOut
}
Am I liable to miss some lines from when I start proc to when the capturing/parsing begins or will it wait? If it doesn't what can I do?
If you're redirecting the input and/or output of the process via ProcessStartInfo.RedirectStandardOutput, etc, the process output will go directly to your streams. You won't miss any input or output.