sigtrap disabled after DBI->connect

[email protected] ("Lynn, Steve")
Newsgroups perl.dbi.users
Message-ID <[email protected]>
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/[email protected]/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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.