about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiXSearch.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-10-30 08:11:42 +0000
committerEric Wong <e@80x24.org>2021-10-30 18:34:33 +0000
commit8fbb1e5d9430b9403679c5701e109d43ad979f3f (patch)
tree65097c69b9f72bbfeb57c97f8aca797d76cf06e1 /lib/PublicInbox/LeiXSearch.pm
parent97a9139a75729c41bb91acd711e8b088e6379600 (diff)
downloadpublic-inbox-8fbb1e5d9430b9403679c5701e109d43ad979f3f.tar.gz
SIGPIPE and SIGTERM are common and user-induced, so they're
not worth warning on.  Add the value of "$?", though, since
it can help users notice other errors (e.g. SIGSEGV).
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r--lib/PublicInbox/LeiXSearch.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index 2a037f2b..29df07e0 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -409,7 +409,10 @@ sub git { $_[0]->{git} // die 'BUG: git uninitialized' }
 sub xsearch_done_wait { # dwaitpid callback
         my ($arg, $pid) = @_;
         my ($wq, $lei) = @$arg;
-        $lei->child_error($?, 'non-fatal error from '.ref($wq)) if $?;
+        return if !$?;
+        my $s = $? & 127;
+        return $lei->child_error($?) if $s == 13 || $s == 15;
+        $lei->child_error($?, 'non-fatal error from '.ref($wq)." \$?=$?");
 }
 
 sub query_done { # EOF callback for main daemon