about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-23 20:51:49 +0000
committerEric Wong <e@yhbt.net>2020-06-23 21:17:34 +0000
commit7601f7d864d74dae58ee248e426527fb2ebe74a5 (patch)
tree44414972a5bc877d3476cd3be99a31213cc72e19
parent924525056df65930722aa2051134f33542cb8937 (diff)
downloadpublic-inbox-7601f7d864d74dae58ee248e426527fb2ebe74a5.tar.gz
testcommon: DS->Reset when using fork-only subprocess
This fixes a bug on FreeBSD 11 here -nntpd + TEST_RUN_MODE=2
(default) was occasionally causing failures in t/v2writable.t
due to the kqueue descriptor being auto-closed by the OS on fork.
-rw-r--r--lib/PublicInbox/TestCommon.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index 6bf4526a..dc360135 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -372,6 +372,7 @@ sub start_script {
                 }
                 $0 = join(' ', @$cmd);
                 if ($sub) {
+                        eval { PublicInbox::DS->Reset };
                         _run_sub($sub, $key, \@argv);
                         POSIX::_exit($? >> 8);
                 } else {