From: Nala Ginrut <nalaginrut@gmail.com>
To: Paul Emsley <paul.emsley@bioch.ox.ac.uk>
Cc: guile-user@gnu.org
Subject: Re: execlp
Date: Wed, 23 Nov 2011 20:28:56 +0800 [thread overview]
Message-ID: <CAPjoZodBcRnqsHik4XWeWCxnOgZzeyHaS1VAGoiW7JXZjTbTwQ@mail.gmail.com> (raw)
In-Reply-To: <4ECCE42F.8030404@bioch.ox.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
On Wed, Nov 23, 2011 at 8:16 PM, Paul Emsley <paul.emsley@bioch.ox.ac.uk>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. ;-)
[-- Attachment #2: Type: text/html, Size: 1336 bytes --]
next prev parent reply other threads:[~2011-11-23 12:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Nala Ginrut [this message]
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=CAPjoZodBcRnqsHik4XWeWCxnOgZzeyHaS1VAGoiW7JXZjTbTwQ@mail.gmail.com \
--to=nalaginrut@gmail.com \
--cc=guile-user@gnu.org \
--cc=paul.emsley@bioch.ox.ac.uk \
/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).