From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2D6D01F4B4 for ; Thu, 31 Dec 2020 06:54:14 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] searchidxshard: call DS->Reset at worker start Date: Thu, 31 Dec 2020 06:54:14 +0000 Message-Id: <20201231065414.13048-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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. --- lib/PublicInbox/SearchIdxShard.pm | 1 + 1 file changed, 1 insertion(+) 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);