RE: DBD::Oracle and CHLD Signal Handler
This sounds terribly familiar! Check out comments in my Sys::SigAction module. Referred to in DBD::Oracle docs I think. You may find something useful in there too. There is an oracle specific POD and test script. I strongly suspect that Oracle OCI libraries might be didling with signal() or sigaction() under the covers... and Note that you set the sighandler globally... so once its diddled, it will never get reset. Using the technique in this module may well solve your problem. Lincoln -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 11:21 AM To: Peter Marksteiner Cc: dbi-users@perl.org Subject: Re: DBD::Oracle and CHLD Signal Handler Oh, the joys of Oracle. Add "require DBD::Oracle;" to check if it's a load-time or connect-time issue. Print $!. Use process tracing tools (like truss, ktrace etc) to see what's happening. Let us know what you find. Have the appropriate amount of fun! Tim. On Tue, Jan 25, 2005 at 03:51:40PM +0100, Peter Marksteiner wrote: > I have a strange problem when connecting to an Oracle 10 database: > > #!/usr/bin/perl > > use strict; > use warnings; > use DBI; > > my $rc = system "true"; > print "Before: $rc\n"; > > my $dbh = DBI->connect("dbi:Oracle:", "scott", "tiger"); > > $rc = system "true"; > print "After: $rc\n"; > > $SIG{CHLD} = 'DEFAULT'; > > $rc = system "true"; > print "Default: $rc\n"; > >gives the following result: > > Before: 0 > After: -1 > Default: 0 > > In other words, connecting to the database meddles with the CHLD signal > handler in such a way that it looks as if all subsequent calls to > system() failed. > > This is perl 5.8.6 on an AIX 5.2 system (64bit) with DBI 1.46 and > DBD::Oracle 1.16; the Oracle version is 10.1.0.2.0. I never had this > problem with Oracle Versions 8 and 9. > >Any ideas? >Peter > > -- > Peter Marksteiner > Vienna University Computer Center
Re: DBD::Oracle and CHLD Signal Handler
Oh, the joys of Oracle. Add "require DBD::Oracle;" to check if it's a load-time or connect-time issue. Print $!. Use process tracing tools (like truss, ktrace etc) to see what's happening. Let us know what you find. Have the appropriate amount of fun! Tim. On Tue, Jan 25, 2005 at 03:51:40PM +0100, Peter Marksteiner wrote: > I have a strange problem when connecting to an Oracle 10 database: > > #!/usr/bin/perl > > use strict; > use warnings; > use DBI; > > my $rc = system "true"; > print "Before: $rc\n"; > > my $dbh = DBI->connect("dbi:Oracle:", "scott", "tiger"); > > $rc = system "true"; > print "After: $rc\n"; > > $SIG{CHLD} = 'DEFAULT'; > > $rc = system "true"; > print "Default: $rc\n"; > >gives the following result: > > Before: 0 > After: -1 > Default: 0 > > In other words, connecting to the database meddles with the CHLD signal > handler in such a way that it looks as if all subsequent calls to > system() failed. > > This is perl 5.8.6 on an AIX 5.2 system (64bit) with DBI 1.46 and > DBD::Oracle 1.16; the Oracle version is 10.1.0.2.0. I never had this > problem with Oracle Versions 8 and 9. > >Any ideas? >Peter > > -- > Peter Marksteiner > Vienna University Computer Center
DBD::Oracle and CHLD Signal Handler
I have a strange problem when connecting to an Oracle 10 database: #!/usr/bin/perl use strict; use warnings; use DBI; my $rc = system "true"; print "Before: $rc\n"; my $dbh = DBI->connect("dbi:Oracle:", "scott", "tiger"); $rc = system "true"; print "After: $rc\n"; $SIG{CHLD} = 'DEFAULT'; $rc = system "true"; print "Default: $rc\n"; gives the following result: Before: 0 After: -1 Default: 0 In other words, connecting to the database meddles with the CHLD signal handler in such a way that it looks as if all subsequent calls to system() failed. This is perl 5.8.6 on an AIX 5.2 system (64bit) with DBI 1.46 and DBD::Oracle 1.16; the Oracle version is 10.1.0.2.0. I never had this problem with Oracle Versions 8 and 9. Any ideas? Peter -- Peter Marksteiner Vienna University Computer Center