diff options
author | Eric Wong <e@80x24.org> | 2021-01-24 22:41:58 -0800 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-26 18:51:31 +0000 |
commit | da86f10a548d4cce25f91bb4063f82ecbbe441a1 (patch) | |
tree | e19b26c90c73a05fd08f5f9796fb5fcb57563200 /t | |
parent | 99d3f175072a8ef062ba6335a3ceb267ba89c12b (diff) | |
download | public-inbox-da86f10a548d4cce25f91bb4063f82ecbbe441a1.tar.gz |
Mainly around fork() calls, but some nearby places as well.
Diffstat (limited to 't')
-rw-r--r-- | t/gcf2.t | 2 | ||||
-rw-r--r-- | t/imap_tracker.t | 2 | ||||
-rwxr-xr-x | t/run.perl | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -114,7 +114,7 @@ SKIP: { $w->blocking($blk); seek($fh, 0, SEEK_SET) or BAIL_OUT "seek: $!"; truncate($fh, 0) or BAIL_OUT "truncate: $!"; - defined(my $pid = fork) or BAIL_OUT "fork: $!"; + my $pid = fork // BAIL_OUT "fork: $!"; if ($pid == 0) { close $w; tick; # wait for parent to block on writev diff --git a/t/imap_tracker.t b/t/imap_tracker.t index be7c6e65..90dea99f 100644 --- a/t/imap_tracker.t +++ b/t/imap_tracker.t @@ -29,7 +29,7 @@ SKIP: { diag "TEST_STRESS_NPROC=$nproc TEST_STRESS_NR=$nr"; require POSIX; for my $n (1..$nproc) { - defined(my $pid = fork) or BAIL_OUT "fork: $!"; + my $pid = fork // BAIL_OUT "fork: $!"; if ($pid == 0) { my $url = "imap://example.com/INBOX.$$"; my $uidval = time; @@ -128,7 +128,7 @@ my $eof; # we stop respawning if true my $start_worker = sub { my ($i, $j, $rd, $todo) = @_; - defined(my $pid = fork) or DIE "fork: $!"; + my $pid = fork // DIE "fork: $!"; if ($pid == 0) { $worker = $$; while (1) { |