From: Eric Wong Date: Tue, 2 Feb 2021 11:46:58 +0000 (+0000) Subject: lei_xsearch: ensure curl.err and tail(1) cleanup happens X-Git-Tag: v1.7.0~1236 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c5675254f496c6b66ba9db609873f1f94270201;p=thirdparty%2Fpublic-inbox.git lei_xsearch: ensure curl.err and tail(1) cleanup happens 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. --- diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index b3cace749..e207f0fc0 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};