I have been observing that Process.HasExited sometimes returns true even though the process is still running.
Process.HasExited
true
My code below starts a proces
Maybe the problem is in the testprogram? Does this code nicely flush/close etc.? It seems to me if testprogram writes a file to disk, the file should at least be available (empty or not)