diff options
author | Eric Wong <e@80x24.org> | 2023-11-02 09:35:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-11-02 23:46:51 +0000 |
commit | aa8a5b0d3de5304aa56c53fd2f6717be9a44f559 (patch) | |
tree | ed8505d0b546a61260d4d85dd3d30b6c71931a06 /lib | |
parent | b55283692989f6b21ec287edbd043e76b3d78cbf (diff) | |
download | public-inbox-aa8a5b0d3de5304aa56c53fd2f6717be9a44f559.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/XapHelper.pm | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/PublicInbox/XapHelper.pm b/lib/PublicInbox/XapHelper.pm index f7640f4c..41c66a12 100644 --- a/lib/PublicInbox/XapHelper.pm +++ b/lib/PublicInbox/XapHelper.pm @@ -216,14 +216,9 @@ sub reap_worker { # awaitpid CB 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(); |