We can just use the non-wantarray form of popen_rd to
save us some extra error checking.
---
xt/httpd-async-stream.t | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/xt/httpd-async-stream.t b/xt/httpd-async-stream.t
index 0658c691..904f2ae9 100644
--- a/xt/httpd-async-stream.t
+++ b/xt/httpd-async-stream.t
@@ -58,7 +58,7 @@ my $do_get_all = sub {
my ($buf, $nr);
my $bytes = 0;
my $t0 = now();
- my ($rd, $pid) = popen_rd([$curl, @CURL_OPT, $url]);
+ my $rd = popen_rd([$curl, @CURL_OPT, $url]);
while (1) {
$nr = sysread($rd, $buf, 65536);
last if !$nr;
@@ -67,9 +67,7 @@ my $do_get_all = sub {
}
my $res = $dig->hexdigest;
my $elapsed = sprintf('%0.3f', now() - $t0);
- close $rd or die "close curl failed: $!\n";
- waitpid($pid, 0) == $pid or die "waitpid failed: $!\n";
- $? == 0 or die "curl failed: $?\n";
+ close $rd or die "close curl failed: $! \$?=$?\n";
print STDERR "# $job $$ ($?) $res (${elapsed}s) $bytes bytes\n";
$res;
};