local @PublicInbox::DS::post_loop_do = (\&shards_active);
PublicInbox::DS::event_loop($MY_SIG, $SIGSET);
- PublicInbox::DS->Reset;
$self->lock_release(!!$NCHANGE);
show_json($self);
}
sub waitcb { # awaitpid callback
my ($pid, $errref, $cb, @args) = @_;
- $errref //= \my $workaround_await_pids_clobbered;
- $$errref = $?; # sets .cerr for _close
+ $$errref = $? if $errref; # sets .cerr for _close
$cb->($pid, @args) if $cb; # may clobber $?
- $? = $$errref;
}
sub attach_pid {
} else { # wait synchronously
my $w = awaitpid($reap->[1]);
}
- $? ? '' : $ret; # use $?, AWAIT_PIDS may be cleared on ->Reset (FIXME?)
+ $? ? '' : $ret;
}
sub DESTROY {