[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
execlp
From: |
Paul Emsley |
Subject: |
execlp |
Date: |
Tue, 22 Nov 2011 16:06:22 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b2 Thunderbird/3.1.11 |
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.