system call might fail with EAGAIN when the other forked process
has already read the data.
-# $OpenBSD: funcs.pl,v 1.6 2014/04/24 09:05:10 bluhm Exp $
+# $OpenBSD: funcs.pl,v 1.7 2014/08/18 21:51:45 bluhm Exp $
# Copyright (c) 2010-2013 Alexander Bluhm <bluhm@openbsd.org>
#
}
my $read = sysread(STDIN, $buf,
$max && $max < $size ? $max : $size);
+ next if !defined($read) && $!{EAGAIN};
defined($read)
or die ref($self), " sysread at $len failed: $!";
if ($read == 0) {