[Mono-dev] CreateProcess: error creating process handle
Rolf Bjarne Kvinge
rolf at xamarin.com
Mon Jan 9 12:46:35 UTC 2012
On Sun, Jan 8, 2012 at 8:30 PM, Jake1305 <jake1305 at gmail.com> wrote:
> Hi there,
> Recently I've been developing an application in C# and I am using Mono to
> run it on Linux, I'm specifically testing on Debian 6.
> After a 2-8 hours the application keeps showing a warning, which
> is CreateProcess: error creating process handle. This warning has been
> posted on this mailing list before, specifically
> http://mono.1490590.n4.nabble.com/Mono-CreateProcess-error-td1525870.html and
> in several other places I believe.
> My application creates at least 10 processes per minute which run for
> under a second/half a second normally and I also called
> process.WaitForExit() and process.Dispose() to try help circumvent the
> error as suggested in other emails and as I've seen on Google,
> but unfortunately it has not helped.
> I was wondering if anybody has any potential solutions, It happens on both
> 2.10.2 and 2.10.6.
> I saw this test case here:
> System.Diagnostics.Process processes = new System.Diagnostics.Process;
> for (int i = 0; i < 4096; i++)
> Console.WriteLine("Starting: " + i.ToString());
> processes[i] = new System.Diagnostics.Process();
> processes[i].StartInfo.FileName ="echo";
> processes[i].StartInfo.Arguments = "\"hello mono \";";
This test case isn't disposing the processes. If I add this at the end
(after the sleep):
processes[i] = null;
I can successfully run the test case to completion.
> Sorry for re-asking this question but I have not found a working solution
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list