SPUG: Signals: Best Practices?

Ivan Heffner iheffner at gmail.com
Sun Nov 5 00:01:16 PST 2006


I recently had a run-in with signals at work.  "Growing up" on a Perl
that used the "old unreliable SysV way" I was bitten when Perl 5.8.6
did not behave the same way.  We have a fairly mixed environment at
work where newer applications are built on what is considered "stable"
technology at the time, so some older applications use Apache/mod_perl
1.x built on Perl 5.6.x while newer applications are using
Apache/mod_perl 2.x using Perl 5.8.6.

We have several Perl modules that are shared across applications and,
therefore, across platforms.  One of these shared modules had some
signal handling code in it which was not behaving "correctly" on our
newer systems.  After some brief trouble shooting, someone remembered
that the newer Perl handles signals differently.

After some debate (and research), we decided to use Sys::SigAction in
this module.  IIRC, our implementation pretty closely followed example
#2 in the POD for Sys::SigAction and I don't think we've had a problem
with that code since.

-- 
Ivan Heffner
Sr. Software Engineer
DAS Lead
WhitePages.com


More information about the spug-list mailing list