Created attachment 6826 [details]
Solution file with simple console application demonstrating issue.
This works fine on 3.2.6 on OS X 10.9.3. It stopped working on Mono 3.2.7. Verified that this is still not working on 3.4.0.
The issue is simple. The Process.WaitForExit(int) value returns immediately, ignoring the wait value that is passed to it.
This has been fixed in mono master. Now it correctly throws InvalidOperationException instead of returning immediately.
The previous behavior was wrong and was fixed in 3.2.7 as you noted.
Where is the InvalidOperationException the documented behavior?
From actually testing the MS implementation.
I'm confused. The correct implementation is that the method should wait for the specified number of milliseconds. If that amount of time elapses, it should return false. However, what is happening on 3.2.7 is that the method returns false *immediately*.
Where does the InvalidOperationException come into the picture?
Now the correctly behavior, which is throwing an exception, happens.
This is not the correct behavior for Process.WaitForExit(int32). The correct behavior is for the Process object to return HasExited=false until the Process either exits or the timeout occurs where timeout is the value in milliseconds passed to WaitForExit. Nowhere in .NET does this throw an InvalidOperationException.
This is a regression and this bug should be reactivated and resolved properly. This was working correctly prior to 3.2.7 but is now broken in all versions since.
Waiting is only available for process creation and not for shell execution.
Since your sample asks for an app to be launched and not a process to be executed, waiting is not available.
This is the same behavior as of MS and it was introduced to fix issues with shell executing web pages leaving zombies behind.