diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-08-18 21:51:46 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-08-18 21:51:46 +0000 |
commit | 6329cca940dd07ff72e366d37ba82e3909c4a2a4 (patch) | |
tree | 08ca5f3ada0b4348b81e104ddfd1a53de04eb5bf | |
parent | 652328e57c54cc5597e2502eca685020e4f94ab7 (diff) |
Make the forking tests more reliable. During copy the read(2)
system call might fail with EAGAIN when the other forked process
has already read the data.
-rw-r--r-- | regress/sys/kern/sosplice/funcs.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/regress/sys/kern/sosplice/funcs.pl b/regress/sys/kern/sosplice/funcs.pl index 19c68b95e55..aab739f3a62 100644 --- a/regress/sys/kern/sosplice/funcs.pl +++ b/regress/sys/kern/sosplice/funcs.pl @@ -1,4 +1,4 @@ -# $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> # @@ -205,6 +205,7 @@ sub relay_copy_stream { } 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) { |