Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^4: Perl Signals

by afoken (Abbot)
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.


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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://938648]
and the sunlight beams...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2018-04-23 14:09 GMT
Find Nodes?
    Voting Booth?