[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] waitpid should not crash on error

From: Nala Ginrut
Subject: Re: [PATCH] waitpid should not crash on error
Date: Tue, 18 Oct 2011 10:22:34 +0800

On Tue, Oct 18, 2011 at 1:00 AM, Mark H Weaver <address@hidden> wrote:
Nala Ginrut <address@hidden> 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))


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. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]