]> Sergey Matveev's repositories - public-inbox.git/blobdiff - xt/create-many-inboxes.t
use defined-or in a few more places
[public-inbox.git] / xt / create-many-inboxes.t
index 0c2de40d47c1a1ae894d32a909f110e3e3546ff2..f44334cce6dd9e383c5168ea24980725d7a85f81 100644 (file)
@@ -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);