diff options
author | 2015-07-16 18:18:07 +0000 | |
---|---|---|
committer | 2015-07-16 18:18:07 +0000 | |
commit | 758b33810e74b87e45d2ed4bd5724c94322cfd52 (patch) | |
tree | eb66b01e250001f3d3ad733a3583f2e93bea3616 | |
parent | Fix rn_match and there for the expoerted lookup functions in radix.c (diff) | |
download | wireguard-openbsd-758b33810e74b87e45d2ed4bd5724c94322cfd52.tar.xz wireguard-openbsd-758b33810e74b87e45d2ed4bd5724c94322cfd52.zip |
Use sysread instead of <STDIN> for the stream.
-rw-r--r-- | regress/usr.sbin/httpd/tests/funcs.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/regress/usr.sbin/httpd/tests/funcs.pl b/regress/usr.sbin/httpd/tests/funcs.pl index c8512900522..f6503e72a11 100644 --- a/regress/usr.sbin/httpd/tests/funcs.pl +++ b/regress/usr.sbin/httpd/tests/funcs.pl @@ -1,4 +1,4 @@ -# $OpenBSD: funcs.pl,v 1.2 2015/07/16 16:38:40 reyk Exp $ +# $OpenBSD: funcs.pl,v 1.3 2015/07/16 18:18:07 reyk Exp $ # Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org> # @@ -288,15 +288,15 @@ sub read_char { if (defined($max) && $max == 0) { print STDERR "Max\n"; } else { - while (<STDIN>) { - $len += length($_); + while ((my $r = sysread(STDIN, my $buf, POSIX::BUFSIZ))) { + $_ = $buf; + $len += $r; $ctx->add($_); print STDERR "."; if (defined($max) && $len >= $max) { print STDERR "\nMax"; last; } - #sleep 1 if (($len % 512) == 0); } print STDERR "\n"; } |