unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* execlp
@ 2011-11-22 16:06 Paul Emsley
  2011-11-23  5:47 ` execlp Nala Ginrut
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Emsley @ 2011-11-22 16:06 UTC (permalink / raw)
  To: guile-user


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.






^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-11-23 19:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 16:06 execlp Paul Emsley
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

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).