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

Charlie Poole charlie at nunit.com
Thu Nov 12 11:45:36 EST 2009


Hi Anteru, 

> Err, the problem is, if the C# code is executed with the Mono 
> Runtime, the Start() call hangs, while it works with the 
> MS.NET runtime -- I didn't check whether it makes a 
> difference whether the _target_ process uses a different runtime.
> 
> The problem is that the _host app_ (from which I took the 
> code) behaves differently with .NET and Mono; with Mono on 
> Linux, it simply hangs at the p.Start() call :/

Actually, it behaves the same way. That is, it instructs the
OS to load and execute a particular executable. On Linux, that
executable is not... well... executable.

In my own app, I detect that I'm running under mono and use
mono.exe as the program to run, putting my target exe in
place of the first argument. It's the only approach I've been
able to make work consistently. If there's a better way to
do that, I'd love to know about it myself.

OTOH, I agree that hanging on the call is a problem in itself.
I'd expect a failure.

Charlie





More information about the Mono-list mailing list