about summary refs log tree commit homepage
path: root/xt
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-24 22:41:58 -0800
committerEric Wong <e@80x24.org>2021-01-26 18:51:31 +0000
commitda86f10a548d4cce25f91bb4063f82ecbbe441a1 (patch)
treee19b26c90c73a05fd08f5f9796fb5fcb57563200 /xt
parent99d3f175072a8ef062ba6335a3ceb267ba89c12b (diff)
downloadpublic-inbox-da86f10a548d4cce25f91bb4063f82ecbbe441a1.tar.gz
Mainly around fork() calls, but some nearby places as well.
Diffstat (limited to 'xt')
-rw-r--r--xt/create-many-inboxes.t3
1 files changed, 1 insertions, 2 deletions
diff --git a/xt/create-many-inboxes.t b/xt/create-many-inboxes.t
index 0c2de40d..f44334cc 100644
--- a/xt/create-many-inboxes.t
+++ b/xt/create-many-inboxes.t
@@ -68,7 +68,7 @@ my @children;
 for my $i (1..$nproc) {
         my ($r, $w);
         pipe($r, $w) or BAIL_OUT $!;
-        my $pid = fork;
+        my $pid = fork // BAIL_OUT "fork: $!";
         if ($pid == 0) {
                 close $w;
                 while (my $i = <$r>) {
@@ -77,7 +77,6 @@ for my $i (1..$nproc) {
                 }
                 _exit(0);
         }
-        defined $pid or BAIL_OUT "fork: $!";
         close $r or BAIL_OUT $!;
         push @children, [ $w, $pid ];
         $w->autoflush(1);