about summary refs log tree commit homepage
path: root/xt
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-07-13 02:23:28 +0000
committerEric Wong <e@yhbt.net>2020-07-13 21:12:57 +0000
commitd78efbd2f3d973477099261e3c75bf4852473b77 (patch)
treeb283feab122da1beec9ca7c638ed0f8b95f549d8 /xt
parentded05deae357a9a27ece00f1c5f1cd63782fadef (diff)
downloadpublic-inbox-d78efbd2f3d973477099261e3c75bf4852473b77.tar.gz
Test::More dups standard FDs and may create FDs for other
purposes.  run_mode => 0 lets us rely on FD_CLOEXEC to ensure
-imapd has enough FDs to accept all incoming connections at
the cost of higher (one-off) startup time.
Diffstat (limited to 'xt')
-rw-r--r--xt/mem-imapd-tls.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/xt/mem-imapd-tls.t b/xt/mem-imapd-tls.t
index 660fdc77..3f1436c7 100644
--- a/xt/mem-imapd-tls.t
+++ b/xt/mem-imapd-tls.t
@@ -49,7 +49,9 @@ my $imaps_addr = $imaps->sockhost . ':' . $imaps->sockport;
 my $env = { PI_CONFIG => $pi_config };
 my $arg = $TEST_TLS ? [ "-limaps://$imaps_addr/?cert=$cert,key=$key" ] : [];
 my $cmd = [ '-imapd', '-W0', @$arg, "--stdout=$out", "--stderr=$err" ];
-my $td = start_script($cmd, $env, { 3 => $imaps });
+
+# run_mode=0 ensures Test::More FDs don't get shared
+my $td = start_script($cmd, $env, { 3 => $imaps, run_mode => 0 });
 my %ssl_opt;
 if ($TEST_TLS) {
         %ssl_opt = (