Well, I noticed your second question. ;-)
The common method to determine a executable file is stat:perms, you may
check it out in the manual for details.
On Wed, Nov 23, 2011 at 1:47 PM, Nala Ginrut <nalagin...@gmail.com> wrote:

> 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.ems...@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.
>>
>>
>>
>>
>>
>

Reply via email to