Re: execvp and nvmatch () issue on solaris

From: Casper H.S. Dik (Casper.Dik_at_Sun.COM)
Date: 04/28/05


Date: 28 Apr 2005 21:14:23 GMT


"Shekar" <ctippur@msn.com> writes:

>All,

>I am trying to execute a binary "mybinary" with arguments using
>execvp() system call as in:
>BTW: I can run "bin/mybinary hello" from command line and it returns
>the right value.
>char * const myargc[]={"bin/mybinary","hello",NULL};
>if (execvp(myargc[0],myargc) == -1)
> perror("execvp");

>I am getting SIGSEGV and this is what gdb shows:

>Program received signal SIGSEGV, Segmentation fault.
>0xff2b9dd8 in nvmatch ()
>(gdb) bt
>#0 0xff2b9dd8 in nvmatch ()
>#1 0xff2b9e8c in getenv ()
>#2 0xff2b7fb4 in execvp ()
>#3 0x10dc4 in main (argc=3, argv=0xffbefdb4) at myhandler.c:154

>I would really appreciate if someone could put some light on to this
>issue.

Please post self-contained source showing the issue.

Casper

-- 
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Quantcast