about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-07-30 00:04:45 -0500
committerEric Wong <e@80x24.org>2018-07-30 08:06:42 +0000
commit8e0e850859fc9572cf201111728eaa621eace451 (patch)
treea0551ea7ecc6b0fd3c7b0ca25deafe6a1d33f546 /lib/PublicInbox
parent466df3e029fecdabac373d73989c7fceebe6ae28 (diff)
downloadpublic-inbox-8e0e850859fc9572cf201111728eaa621eace451.tar.gz
While playing with git fast export I discovered that mixing <> and
read would give inconsistent results.  I tracked the issue down to
using sysread in ProcessPipe instead of plain read.

If it is desirable to use readline I can't see how using sysread
can work as readline to be efficient needs to use buffered I/O.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/ProcessPipe.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/ProcessPipe.pm b/lib/PublicInbox/ProcessPipe.pm
index 7bb6ddee..2769e064 100644
--- a/lib/PublicInbox/ProcessPipe.pm
+++ b/lib/PublicInbox/ProcessPipe.pm
@@ -11,7 +11,7 @@ sub TIEHANDLE {
         bless { pid => $pid, fh => $fh }, $class;
 }
 
-sub READ { sysread($_[0]->{fh}, $_[1], $_[2], $_[3] || 0) }
+sub READ { read($_[0]->{fh}, $_[1], $_[2], $_[3] || 0) }
 
 sub READLINE { readline($_[0]->{fh}) }