From: Nala Ginrut <nalaginrut@gmail.com>
To: Mark H Weaver <mhw@netris.org>, guile-devel <guile-devel@gnu.org>
Subject: Re: [PATCH] waitpid should not crash on error
Date: Tue, 18 Oct 2011 10:22:34 +0800 [thread overview]
Message-ID: <CAPjoZodoHaC8Xo0uTjgdQNsaz3MRQbpXaKrOMtNCt04rwcxMQw@mail.gmail.com> (raw)
In-Reply-To: <87zkgzpn87.fsf@yeeloong.netris.org>
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
On Tue, Oct 18, 2011 at 1:00 AM, Mark H Weaver <mhw@netris.org> wrote:
> Nala Ginrut <nalaginrut@gmail.com> writes:
> > I realized that "waitpid" in Guile will cause my program crash while
> > "waitpid" actually returned -1. I believe it's unnecessary. I think
> > the better way is we deal with it by ourselves if "waitpid in POSIX"
> > returned -1. The SCM_SYSERROR bother me a lot. I hope my program
> > get robustness other than crash.
>
> The proper way to deal with this is to catch the system error, e.g.:
>
> (catch 'system-error
> (lambda () (waitpid the-pid))
> (lambda (key . args) 'waitpid-failed))
>
> Best,
> Mark
>
Oh thanks ,that's what I need.
But how can I find the error message like 'waitpid-failed? I can't find it
in the manual.
[-- Attachment #2: Type: text/html, Size: 1238 bytes --]
next prev parent reply other threads:[~2011-10-18 2:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-16 3:57 [PATCH] waitpid should not crash on error Nala Ginrut
2011-10-17 17:00 ` Mark H Weaver
2011-10-18 2:22 ` Nala Ginrut [this message]
2011-10-18 14:58 ` Andy Wingo
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=CAPjoZodoHaC8Xo0uTjgdQNsaz3MRQbpXaKrOMtNCt04rwcxMQw@mail.gmail.com \
--to=nalaginrut@gmail.com \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.org \
/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).