develooper Front page | perl.perl5.porters | Postings from January 2001

"Safe Signals" - please try this test

Thread Next
From:
nick
Date:
January 17, 2001 12:37
Subject:
"Safe Signals" - please try this test
Message ID:
E14IzHv-0006Fh-00@roam1

I am playing with safe signals again.

With this scheme C code just sets a pending flag, and then perl level 
handler is called next time round the runops loop.

I have a half remembered worry. I seem to recall some system where 
if the SIGCHLD signal handlder did not do a wait() of some kind
then when it returned SIGCHLD was posted again, and again, and ...

The attached program attempts to test for this case.
Will those of you with various UNIXes try it please?
(Linux+glibc is okay).

If I have remembered correctly, then on such awkward systems we need 
to do a wait() in the handler and save status somewhere. Which is a 
pain as one does not know (in the general case) the pid in advance 
to pre-allocate storage.

-- 
Nick Ing-Simmons


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About