From 8388a137ac3b13edaa361a7fb6c85fea3c409ea8 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Mon, 10 Jun 2019 21:43:52 +0000 Subject: [PATCH] v2writable: replace: kill git processes before reindexing Xapian on Linux <3.15 has trouble with coprocesses since it used fork() for locking and would hold onto pipes used for git unnecessarily. --- lib/PublicInbox/V2Writable.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 3484807b..09ed4e7b 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -533,6 +533,9 @@ W: $list my ($oid, $type, $len) = $self->{-inbox}->git->check($expect_oid); $oid eq $expect_oid or die "BUG: $expect_oid not found after replace"; + # don't leak FDs to Xapian: + $self->{-inbox}->git->cleanup; + # reindex modified messages: for my $smsg (@$need_reindex) { my $num = $smsg->{num}; -- 2.44.0