package PublicInbox::ProcessPipe;
use strict;
use v5.10.1;
-use PublicInbox::DS qw(dwaitpid);
use Carp qw(carp);
sub TIEHANDLE {
$class;
}
+sub BINMODE { binmode(shift->{fh}) } # for IO::Uncompress::Gunzip
+
sub READ { read($_[0]->{fh}, $_[1], $_[2], $_[3] || 0) }
sub READLINE { readline($_[0]->{fh}) }
carp "waitpid($pid, 0) = $wp, \$!=$!, \$?=$?";
}
} else { # caller just undef-ed it, let event loop deal with it
- dwaitpid $pid, $cb, $arg;
+ require PublicInbox::DS;
+ PublicInbox::DS::dwaitpid($pid, $cb, $arg);
}
$ret;
}