We may start using rand() in the worker someday if we need
to seed a hash function for caching. It saves us some LoC
in the meantime.
sub start_worker ($) {
my ($nr) = @_;
- my $pid = fork;
- if (!defined($pid)) {
- warn("fork: $!");
- return undef;
- };
+ my $pid = eval { PublicInbox::DS::do_fork } // return(warn($@));
if ($pid == 0) {
undef %WORKERS;
- PublicInbox::DS::Reset();
$SIG{TTIN} = $SIG{TTOU} = 'IGNORE';
$SIG{CHLD} = 'DEFAULT'; # Xapian may use this
recv_loop();