From: Dan Fandrich Date: Fri, 19 May 2023 04:11:57 +0000 (-0700) Subject: runtests: use the correct fd after select X-Git-Tag: curl-8_1_1~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c95ca8dfeb29f2e6e521d25933f9ce5c60c4737d;p=thirdparty%2Fcurl.git runtests: use the correct fd after select The code was using the wrong fd when determining which runner was ready with a response. Ref: #10818 Closes #11160 --- diff --git a/tests/runner.pm b/tests/runner.pm index 89182004bf..86867d0fd1 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -1226,7 +1226,7 @@ sub runnerar { } ################################################################### -# Returns runnder ID if a response from an async call is ready +# Returns runner ID if a response from an async call is ready # argument is 0 for nonblocking, undef for blocking, anything else for timeout # Called by controller sub runnerar_ready { @@ -1248,7 +1248,7 @@ sub runnerar_ready { # TODO: handle errors if(select(my $rout=$rin, undef, undef, $blocking)) { for my $fd (0..$maxfileno) { - if(vec($rin, $fd, 1)) { + if(vec($rout, $fd, 1)) { return $idbyfileno{$fd}; } }