From 39b41f2b0c2f3c0773826e6dc7386fe4b764b05e Mon Sep 17 00:00:00 2001 From: bluhm Date: Mon, 18 Aug 2014 21:51:45 +0000 Subject: [PATCH] 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. --- regress/sys/kern/sosplice/funcs.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 # @@ -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) { -- 2.20.1