unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Paul Emsley <paul.emsley@bioch.ox.ac.uk>
To: guile-user@gnu.org
Subject: execlp
Date: Tue, 22 Nov 2011 16:06:22 +0000	[thread overview]
Message-ID: <4ECBC87E.7090000@bioch.ox.ac.uk> (raw)


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.






             reply	other threads:[~2011-11-22 16:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 16:06 Paul Emsley [this message]
2011-11-23  5:47 ` execlp Nala Ginrut
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=4ECBC87E.7090000@bioch.ox.ac.uk \
    --to=paul.emsley@bioch.ox.ac.uk \
    --cc=guile-user@gnu.org \
    /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).