Permalink
Browse files

fix the bad file descriptor error in test 14

  • Loading branch information...
1 parent 1b0f55c commit 3f3472aa13c874c4b75d116cc44c8a91babcf447 @rcaputo committed Nov 30, 2001
Showing with 11 additions and 1 deletion.
  1. +11 −1 lib/POE/Loop/Select.pm
View
@@ -235,10 +235,20 @@ macro substrate_do_timeslice {
}
}
+ # This is heavy. It determines whether there are any files actually
+ # being watched. What is a better way to find a 1 bit in any of the
+ # vectors?
+
my $fileno = 0;
@filenos = ();
foreach (@kr_filenos) {
- push(@filenos, $fileno) if defined $_;
+ push(@filenos, $fileno)
+ if ( defined($_) and
+ ( vec($kr_vectors[VEC_RD], $fileno, 1) or
+ vec($kr_vectors[VEC_WR], $fileno, 1) or
+ vec($kr_vectors[VEC_EX], $fileno, 1)
+ )
+ );
$fileno++;
}

0 comments on commit 3f3472a

Please sign in to comment.