about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-02 11:46:58 +0000
committerEric Wong <e@80x24.org>2021-02-03 07:32:42 +0000
commit8c5675254f496c6b66ba9db609873f1f94270201 (patch)
treefc9d409ba7ad6100d90c7820875c83ad26b819b1 /lib
parenta3b3e0d4c48a85cb411ac5059a1d85906d0c97de (diff)
downloadpublic-inbox-8c5675254f496c6b66ba9db609873f1f94270201.tar.gz
We can safely rely on exit(0) here when interacting with curl(1)
and git(1), unlike query workers which hit Xapian directly,
where some badness happens when hit with a signal while
retrieving an mset.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/LeiXSearch.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index b3cace74..e207f0fc 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -198,6 +198,7 @@ sub query_remote_mboxrd {
         my ($self, $lei, $uris) = @_;
         local $0 = "$0 query_remote_mboxrd";
         $lei->atfork_child_wq($self);
+        local $SIG{TERM} = sub { exit(0) }; # for DESTROY (File::Temp, $reap)
         my ($opt, $env) = @$lei{qw(opt env)};
         my @qform = (q => $lei->{mset_opt}->{qstr}, x => 'm');
         push(@qform, t => 1) if $opt->{thread};