[Mono-list] Weird issue with Process.Start (works with MS .NET)

Charlie Poole charlie at nunit.com
Thu Nov 12 10:40:25 EST 2009

Hi Anteru, 

> got a very weird problem with Process.Start here, and I don't 
> know where to start debugging (first issues actually I ever 
> had with Mono.) Problem appears like this, I set up a 
> ProcessStartInfo, register the OutputDataReceived handler, 
> and then I start the process using Start(), but 
> unfortunately, Start() never returns and the app just hangs. 
> Code looks like this:
>             p.Start();
> 		// Never comes here ...
>             p.BeginOutputReadLine();

I see nothing in your code below that tells the process to run 
under Mono - i.e. invoking via mono.exe.

> I tried it in an isolated test case, but no luck. Using the 
> .NET Runtime on Windows it works flawlessly, while it hangs 
> _every time_ using Mono.
> (Source code:
> http://gitorious.org/network/network/blobs/master/NetWork/Task
> /RunBinaryTask.cs)
> Might be related to the network stuff going on, or maybe 
> because it's in  a ThreadPool :/ I tried to reproduce it in a 
> smaller test case by starting a thread and trying to read 
> (works), I also tried to run in a thread pool (works also), 
> so there must be something in the app which breaks it, but I 
> have no idea where to start debugging.
> I checked access rights, these are fine, and running the 
> executable manually also works fine.
> Thanks,
>   Anteru
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com 
> http://lists.ximian.com/mailman/listinfo/mono-list

More information about the Mono-list mailing list