Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 764 [details]
According to MSDN documentation, and running on win7 with MS CLR, it is valid to start a process with p = Process.Start() and then call p.Close(), without ever calling p.WaitForExit(). You can, in fact, save the process id from the original process object, and create a new one with Process.GetFromProcessId, and call WaitForExit() on that new object, and there will be no leak on the MS CLR.
However, if you do this with the Mono CLR, you can only start 255 processes before failure:
Starting process #255
CreateProcess: error creating process handle
I checked this on Linux Mono 2.10.5 and OS/X 2.10.6
Simple repro code is attached.
Fixed in HEAD/mono-2-10 branch.
*** Bug 6437 has been marked as a duplicate of this bug. ***