Ignore:
Timestamp:
03/09/06 11:14:40 (19 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Haul in another dependency: Sys::SigAction so CustIDCK.pm can
properly catch a failed connection to the DB host. More portable
than stock Perl signal handling, and works around changes in
signal handling for Perl 5.8.x.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/CustIDCK.pm

    r156 r310  
    1515use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
    1616use DBI;
     17
     18# Supposed to provide cross-Perl-version signal handling.
     19# Not part of stock Debian Perl, use dh-make-perl or just
     20#  install straight from CPAN.
     21# Not part of stock RHEL/CentOS, use cpan2perl, cpanflute,
     22#  or just install straight from CPAN.
     23use Sys::SigAction;
    1724
    1825$VERSION        = 1.00;
     
    3643  my $dbh;
    3744  eval {
    38     local $SIG{ALRM} = sub { die "failed connection to newbilling!!" };
     45    my $h = Sys::SigAction::set_sig_handler( 'ALRM',
     46      sub { die "failed connection to apex!!"; } );
     47
    3948    alarm 3;    # 3-second timeout.  This may be too aggressive.
    4049
Note: See TracChangeset for help on using the changeset viewer.