On Wed, Nov 23, 2011 at 8:16 PM, Paul Emsley <[email protected]>wrote:

> Hi Nala Ginrut,
>
> Thanks for your reply.
>
> I suspect I expressed myself poorly. (execlp "ls" "") replaces guile with
> "ls", which lists my files and returns me to the shell.
>
> What is some-function, where some-function works like this:
>
> (some-function "ls")
> -> "/bin/ls"  (I'd settle for #t")
> (some-function "asdfasdf")
> -> #f
>
> I thought that execl or its friends would be the way to answer that
> question...
>
>
I think there's no such a given function in Guile to do this.
But you can make it in a easy way in Guile:
(catch 'system-error
    (lambda () (execlp "asdfasdf"))
      (lambda (k . e)
         (format #t "oh no~%~")))

PS: Maybe you need #f instead of "format" according to your letter. ;-)

Reply via email to