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>) {
}
_exit(0);
}
- defined $pid or BAIL_OUT "fork: $!";
close $r or BAIL_OUT $!;
push @children, [ $w, $pid ];
$w->autoflush(1);