vetrivel has asked for the wisdom of the Perl Monks concerning the following question:
Hai , I am using DBI module to connect with postgres data base .
$SIG{ALRM} = sub { print "Alarm Captured" ; exit ; } ; alarm 10 ; DBI->connect(...) alarm 0 ;
My postgresql server is down . If I run the above code , DBI gives me an error after 20 seconds . In this case , Alarm is not captured . But I required alarm should be executecd . Is alarm useful only for IO Interuppt?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: alarm in DBI module
by salva (Canon) on Aug 31, 2010 at 11:54 UTC | |
Re: alarm in DBI module
by jethro (Monsignor) on Aug 31, 2010 at 12:10 UTC | |
Re: alarm in DBI module
by vek (Prior) on Aug 31, 2010 at 19:53 UTC | |
Re: alarm in DBI module
by mje (Curate) on Sep 08, 2010 at 16:08 UTC |