about summary refs log tree commit homepage
path: root/lib/PublicInbox/MboxReader.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-31 13:51:27 +0000
committerEric Wong <e@80x24.org>2021-01-01 05:00:38 +0000
commit7f17df5c6f1892ef53f149a0ab24a5d917cce7d9 (patch)
treec407a37a4805a2bcd2b1d797ba0f8e343e36dea5 /lib/PublicInbox/MboxReader.pm
parent49350d47032788a7c1213a64e81ad07fc2d41b65 (diff)
downloadpublic-inbox-7f17df5c6f1892ef53f149a0ab24a5d917cce7d9.tar.gz
--augment will match the mairix(1) option of the same
name to augment existing search results.  We'll need
to implement deduplication for a better user experience.

mutt ships with compressed mbox support for bz2 and xz,
at least, so we'll support those out-of-the-box.
Diffstat (limited to 'lib/PublicInbox/MboxReader.pm')
-rw-r--r--lib/PublicInbox/MboxReader.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/MboxReader.pm b/lib/PublicInbox/MboxReader.pm
index e1944aaf..ac0c0f52 100644
--- a/lib/PublicInbox/MboxReader.pm
+++ b/lib/PublicInbox/MboxReader.pm
@@ -5,6 +5,7 @@
 package PublicInbox::MboxReader;
 use strict;
 use v5.10.1;
+use PublicInbox::DS (); # localize $in_loop for error detection :<
 use Data::Dumper;
 $Data::Dumper::Useqq = 1; # should've been the default, for bad data
 
@@ -13,6 +14,7 @@ my $from_strict =
 
 sub _mbox_from {
         my ($mbfh, $from_re, $eml_cb, @arg) = @_;
+        local $PublicInbox::DS::in_loop; # disable dwaitpid
         my $buf = '';
         my @raw;
         while (defined(my $r = read($mbfh, $buf, 65536, length($buf)))) {
@@ -73,6 +75,7 @@ sub _extract_hdr {
 
 sub _mbox_cl ($$$;@) {
         my ($mbfh, $uxs_from, $eml_cb, @arg) = @_;
+        local $PublicInbox::DS::in_loop; # disable dwaitpid
         my $buf = '';
         while (defined(my $r = read($mbfh, $buf, 65536, length($buf)))) {
                 if ($r == 0) { # detect "curl --fail"