On Sep 16, 2006, at 8:58 PM, Sam Tregar wrote:

On Sat, 16 Sep 2006, Henri Asseily wrote:

Use the great Sys::SigAction by Lincoln Baxter.

That's just a wrapper around POSIX sigaction(), right?  As I
understand it that's equivalent to the old unsafe signals in Perl
before 5.8.  I'd rather avoid that if it all possible!

Yes, when you're under 5.8+, it's the POSIX routines.

From the POD:

Unfortunately, at least with perl 5.8.0, the result is that doing this effectively reverts to the 'unsafe' signals behavior. It is not clear whether this would be the case in perl 5.8.2, since safe flag can be used to ask for safe signal handling. I suspect this separates the the logic of which "sa_flags" are used install the handler, and whether
       deferred signal is used.


You've got a catch-22: If you ALWAYS want the signal to fire on time, then you should expect unsafe signals.
Just clean up after yourself.

Personally, when coding DBIx::HA I couldn't find another way.
H

Reply via email to