From: Nala Ginrut <nalaginrut@gmail.com>
To: Paul Emsley <paul.emsley@bioch.ox.ac.uk>, guile-user@gnu.org
Subject: Re: execlp
Date: Wed, 23 Nov 2011 13:47:04 +0800 [thread overview]
Message-ID: <CAPjoZofcicoioUB+n+_Mbu0HCB1DZsGBuHkeUhxp+GRHWgp9pA@mail.gmail.com> (raw)
In-Reply-To: <4ECBC87E.7090000@bioch.ox.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
I think there's a bug.
(execlp "ls" "") will access.
Since the second parameter is optional, scm_execlp doesn't handle exec_argv
unbounded situation.
On Wed, Nov 23, 2011 at 12:06 AM, Paul Emsley <paul.emsley@bioch.ox.ac.uk>wrote:
>
> Hi,
>
> I am trying to see if there is a way to determine if a program is in the
> path (i.e. a bit like "which"), returning a #t or #f answer. I was looking
> execl and execlp.
>
> The documentation for execl says:
>
> > Executes the file named by path as a new process image
>
> what is path ? I'm guessing that that should be "filename".
>
> While playing around, I notice that
>
> (execlp "ls")
>
> produces a core dump.
>
> My question is then, *is* there a way to determine if a string is
> executable? (And if so, how? :-)
>
> Thanks,
>
> Paul.
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1253 bytes --]
next prev parent reply other threads:[~2011-11-23 5:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 16:06 execlp Paul Emsley
2011-11-23 5:47 ` Nala Ginrut [this message]
2011-11-23 5:57 ` execlp Nala Ginrut
2011-11-23 12:16 ` execlp Paul Emsley
2011-11-23 12:22 ` execlp Nala Ginrut
2011-11-23 12:28 ` execlp Nala Ginrut
2011-11-23 14:03 ` execlp rixed
2011-11-23 14:38 ` execlp Nala Ginrut
2011-11-23 19:18 ` execlp Thien-Thi Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPjoZofcicoioUB+n+_Mbu0HCB1DZsGBuHkeUhxp+GRHWgp9pA@mail.gmail.com \
--to=nalaginrut@gmail.com \
--cc=guile-user@gnu.org \
--cc=paul.emsley@bioch.ox.ac.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).