From: Eric Wong Date: Thu, 31 Dec 2020 13:51:47 +0000 (+0000) Subject: searchidxshard: call DS->Reset at worker start X-Git-Tag: v1.7.0~1442 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=71484e7281f608bf21a9b9ded043b26e55660529;p=public-inbox.git searchidxshard: call DS->Reset at worker start The daemon for the local email interface will be inside the DS->EventLoop. -watch currently doesn't trigger this bug since it doesn't enable parallelism, but it may in the future. --- diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm index 87b0bad6..a41477cd 100644 --- a/lib/PublicInbox/SearchIdxShard.pm +++ b/lib/PublicInbox/SearchIdxShard.pm @@ -34,6 +34,7 @@ sub spawn_worker { my $pid = fork; defined $pid or die "fork failed: $!\n"; if ($pid == 0) { + eval { PublicInbox::DS->Reset }; # these signals are localized in parent $SIG{$_} = 'IGNORE' for (qw(TERM INT QUIT)); PublicInbox::Sigfd::sig_setmask($oldset);