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.