]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidxshard: call DS->Reset at worker start
authorEric Wong <e@80x24.org>
Thu, 31 Dec 2020 13:51:47 +0000 (13:51 +0000)
committerEric Wong <e@80x24.org>
Fri, 1 Jan 2021 05:00:40 +0000 (05:00 +0000)
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

index 87b0bad62ed2ab5ae47f138460fd9730e4e9d255..a41477cd2e5295879769e408138e16189babff67 100644 (file)
@@ -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);