guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "exec" procedures don't handle the optional parameters unbounded sit


From: Nala Ginrut
Subject: Re: "exec" procedures don't handle the optional parameters unbounded situation?
Date: Fri, 16 Dec 2011 12:03:50 +0800

hi Ludo, thanks for reply.
I realized that it's not SIGSEGV ,it's an "abort" while argv[0] is NULL. 
Now the problem is  "can we avoid to pass void string to exec proc explicitly"?
Since Guile provides flexible optional arguments handling, why we can not do this:
let (execlp "ls")  equal to (execlp "ls" "") if the second argument is unbounded?

On Fri, Dec 16, 2011 at 3:19 AM, Ludovic Courtès <address@hidden> wrote:
Hi!

Sorry for the late reply.

Nala Ginrut <address@hidden> skribis:

> I found "exec" serial procedures didn't check the unbounded optional
> parameters.
> (execlp "ls")  ==> segment fault

What you’re seeing here is SIGABRT, not SIGSEGV, preceded by the message:

 A NULL argv[0] was passed through an exec system call.

That message comes from Gnulib’s ‘set_program_name’ [0], which is used
by all GNU Coreutils program, and which aborts when argv[0] is NULL.

Thanks,
Ludo’.

[0] http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/progname.c#n53




reply via email to

[Prev in Thread] Current Thread [Next in Thread]