[Mono-dev] execv fails with error status 126

Miguel de Icaza miguel at novell.com
Wed Oct 17 11:28:25 EDT 2007


> > 1. execv() is a Dllimport from libc.
> 
> You should use the Process class.
> 
> > 2. This behavior is not consistently seen. 
> > 3. Application is a daemon process.
> > 4. mono version used 1.1.13
> 
> You should use mono 1.2.5 and up.
> 
> That said, you should post the signature of the method you're using to
> dllimport execv and the way you're calling it: it's most likely that
> is incorrect (for example, do you null terminate the array?).

He should not be using execv anyways because execv will not properly
prepare the runtime for another process (file descriptors used by the
parent need to be explicitly closed after fork, and there are a few
other cleanup tasks that must be done after fork).



More information about the Mono-devel-list mailing list