All - I'm under Solaris using perl v. 5.8.3 and DBI v. 1.48.  I can catch 
signals w/o a problem before I connect to the database.

However after I connect, I can't catch signals anymore.  If I comment out the 
"DBI->connect" and press ctrl-c in a ReadLine(0), the signal is caught fine.



I found one other issue that seemed similar 
(http://www.mail-archive.com/dbi-users@perl.org/msg07747.html).



Please help.



###########################



#!/usr/local/perl -w



use strict;

use warnings;

use Term:ReadKey;

require DBI;



use sigtrap 'handler', \&SigExit, qw/HUP INT KILL/;



my $dbh;

my $response;



sub SigExit {

    print STDOUT "\nTest\n";

    die("\n");

}



$dbh = 
DBI->connect("DBI:Oracle:host=dbserver;sid=mydb;port=1521","scott","tiger");



print "\nEnter a response: ";

$response = ReadLine(0);



print ""\nEnter another response: ";

$response = ReadLine(0);



###########################



Thanks,

Steve

Reply via email to