You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by ph...@apache.org on 2010/02/06 20:39:31 UTC

svn commit: r907286 - /perl/Apache-DBI/trunk/lib/Apache/DBI.pm

Author: phred
Date: Sat Feb  6 19:39:30 2010
New Revision: 907286

URL: http://svn.apache.org/viewvc?rev=907286&view=rev
Log:
Typo

Modified:
    perl/Apache-DBI/trunk/lib/Apache/DBI.pm

Modified: perl/Apache-DBI/trunk/lib/Apache/DBI.pm
URL: http://svn.apache.org/viewvc/perl/Apache-DBI/trunk/lib/Apache/DBI.pm?rev=907286&r1=907285&r2=907286&view=diff
==============================================================================
--- perl/Apache-DBI/trunk/lib/Apache/DBI.pm (original)
+++ perl/Apache-DBI/trunk/lib/Apache/DBI.pm Sat Feb  6 19:39:30 2010
@@ -39,6 +39,9 @@
                                 #   a negative value de-activates ping,
                                 #   default = 0
 my %LastPingTime;               # keeps track of last ping per data_source
+my $ChildExitHandlerInstalled;  # set to true on installation of
+                                # PerlChildExitHandler
+my $InChild;
 
 # Check to see if we need to reset TaintIn and TaintOut
 my $TaintInOut = ($DBI::VERSION >= 1.31) ? 1 : 0;
@@ -218,6 +221,22 @@
     1;
 }
 
+# The PerlChildExitHandler disconnects all open connections
+sub childexit {
+
+    my $prefix = "$$ Apache::DBI            ";
+    debug(2, "$prefix PerlChildExitHandler");
+
+    foreach my $dbh (values(%Connected)) {
+        eval { DBI::db::disconnect($dbh) };
+        if ($@) {
+            debug(2, "$prefix DBI::db::disconnect failed - $@");
+        }
+    }
+
+    1;
+}
+
 # The PerlCleanupHandler is supposed to initiate a rollback after the script
 # has finished if AutoCommit is off.
 # Note: the PerlCleanupHandler runs after the response has been sent to
@@ -517,7 +536,7 @@
   PERL_CHILD_INIT=1 PERL_STACKED_HANDLERS=1
 
 Apache::DBI v0.94 was the last version before dual mod_perl 2.x support was begun.
-It still recommened that you use the latest version of Apache::DBI because Apache::DBI
+It still recommended that you use the latest version of Apache::DBI because Apache::DBI
 versions less than 1.00 are NO longer supported.
 
 =head1 DO YOU NEED THIS MODULE?