[Mono-dev] execv fails with error status 126

Robert Jordan robertj at gmx.net
Wed Oct 17 06:39:50 EDT 2007


C S Vadiraj wrote:
> Hi,
> 
> I have a mono application running. We are noticing a strange behavior while we spawn a shell script using execv() call from mono application.
> commands in the script seem to fail either with error status 126 or with error message "bad interpreter: Argument list too long".
> 
> We suspected a memory outage at that particular point of time, but we did not notice such outage when failed. And all other application working
> without fail. Also to be noted, when the script is executed on command prompt, it succeeds. 
> 
> More info 
> 
> 1. execv() is a Dllimport from libc.

You may consider using System.Diagnostics.Process instead.

> 2. This behavior is not consistently seen. 
> 3. Application is a daemon process.
> 4. mono version used 1.1.13

This is an ancient version. Please update.

Robert




More information about the Mono-devel-list mailing list