Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: Perl Signals

by afoken (Prior)
on Nov 17, 2011 at 16:51 UTC ( #938648=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Perl Signals
in thread Perl Signals

[...] the requirement to re-install a signal handler is some super ancient (many decades ago) stuff. [...] I would think that the Perl docs should be updated.

So do I.

this while() loop in the reaper is definitely needed

I have no problem with the while loop in the reaper, it is properly explained in perlipc.

On the other hand, so is the problem with old SysV behaviour:

But that will be problematic for the more complicated handlers that need to reinstall themselves. Because Perl's signal mechanism is currently based on the signal(3) function from the C library, you may sometimes be so unfortunate as to run on systems where that function is "broken"; that is, it behaves in the old unreliable SysV way rather than the newer, more reasonable BSD and POSIX fashion. So you'll see defensive people writing signal handlers like this:

I think the paragraph cited above and the two examples following it should be moved into a new section "Signal Handlers on Ancient Systems" ("pre-POSIX systems"?), and be replaced with text and examples that concentrate on handling SIGCHLD / wait / waitpid instead of working around ancient API problems.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)


Comment on Re^4: Perl Signals

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://938648]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2015-07-30 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls