From f5f8340c99a3b72a581719cffef62c11a83cb87f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 6 Aug 2020 12:57:31 +0100 Subject: [PATCH] parallel by fork: Disconnect $dbh_tests as well as undefing it 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 --- Osstest/HistoryReport.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Osstest/HistoryReport.pm b/Osstest/HistoryReport.pm index 0b206de..f057118 100644 --- a/Osstest/HistoryReport.pm +++ b/Osstest/HistoryReport.pm @@ -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) { -- 2.39.5