From 6329cca940dd07ff72e366d37ba82e3909c4a2a4 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Mon, 18 Aug 2014 21:51:46 +0000 Subject: 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(-) (limited to 'regress') 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) { -- cgit v1.2.3