[Top][All Lists]

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

Re: [PATCH] waitpid should not crash on error

From: Mark H Weaver
Subject: Re: [PATCH] waitpid should not crash on error
Date: Mon, 17 Oct 2011 13:00:24 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

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))


reply via email to

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