From da86f10a548d4cce25f91bb4063f82ecbbe441a1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 24 Jan 2021 22:41:58 -0800 Subject: use defined-or in a few more places Mainly around fork() calls, but some nearby places as well. --- xt/create-many-inboxes.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xt') 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); -- cgit v1.2.3-24-ge0c7