|
From: | Nala Ginrut |
Subject: | Re: [PATCH] waitpid should not crash on error |
Date: | Tue, 18 Oct 2011 10:22:34 +0800 |
Nala Ginrut <address@hidden> writes:The proper way to deal with this is to catch the system error, e.g.:
> 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.
(catch 'system-error
(lambda () (waitpid the-pid))
(lambda (key . args) 'waitpid-failed))
Best,
Mark
[Prev in Thread] | Current Thread | [Next in Thread] |