]> xenbits.xensource.com Git - osstest.git/commitdiff
parallel by fork: Disconnect $dbh_tests as well as undefing it
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 6 Aug 2020 11:57:31 +0000 (12:57 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 19 Aug 2020 10:41:18 +0000 (11:41 +0100)
If the caller is buggy and has statement handles still open, they can
still "work" even if we have thrown away the db handle.

Where, after forking, "work" means "use the same connection in
multiple processes simultaneously, without locking".  This could
result in arbitrary crazy nbehaviour (eg, TLS crypto failures).

No functional change with existing callers since they don't have this
bug.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/HistoryReport.pm

index 0b206de41b8a233098699111075986479891141a..f0571189ddf786f5210b3a84655655e0d805152e 100644 (file)
@@ -245,6 +245,7 @@ sub parallel_by_fork ($$$$) {
     # db is reopened in each child.
 
     $whoami = $set_whoami;
+    $dbh_tests->disconnect();
     undef $dbh_tests;
 
     foreach my $task (@$tasks) {