[Mono-dev] execv fails with error status 126

C S Vadiraj csvadiraj at novell.com
Thu Oct 18 07:50:09 EDT 2007



>>> On Thu, Oct 18, 2007 at  4:02 PM, in message
<20071018103252.GS27285 at debian.org>, Paolo Molaro <lupus at ximian.com> wrote: 
> On 10/17/07 C S Vadiraj wrote:
>> Yes I've not used fork() but do have lot of threads running at this
>> point of time. If that makes a difference too?
> 
> Well, let's make a deal: you'll first reply to my questions in my original
> mail and then I'll reply to your additional questions:)
> Here again, if you forgot them:
> What is the signature of the method that dllimports execv and what is
> the code that inokes it. Please cut&paste the exact lines of code you're
> using.

Here you go. Sorry for having missed it in my previous reply.


[DllImport ("libc")]
        private static extern int execv (string cmd, string[] args);

execv ("/tmp/myscript", (string[]) list.ToArray (typeof (string)));
list is Array list with set of arguments. Not NULL terminated.


I have further error messages on this application which failed with mono 1.2.0 version too.
Please fine it below.


Stacktrace:

  at (wrapper managed-to-native)
System.Diagnostics.Process.ShellExecuteEx_internal
(System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process/ProcInfo&)
<0x00004>
  at (wrapper managed-to-native)
System.Diagnostics.Process.ShellExecuteEx_internal
(System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process/ProcInfo&)
<0xffffffff>
  at System.Diagnostics.Process.Start_shell
(System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process) <0x00096>
  at System.Diagnostics.Process.Start_common
(System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process) <0x0006e>
  at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo)
<0x00040>
  at System.Diagnostics.Process.Start (string,string) <0x00025>
  at Novell.Zenworks.Tess.EventSystem.EventListenerThread.Run () <0x00073>
  at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void ()
<0xffffffff>
  at Novell.Zenworks.Zmd.ZenThread.WorkerLoop () <0x00216>
  at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void ()
<0xffffffff>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>

Thanks,
Vadiraj



More information about the Mono-devel-list mailing list