Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am getting an error message (select: Bad file descriptor) when attempting to use a bit vector (formed with vec) and select to scan for open file descriptors/network connections to be read from.
If I did the following, it doesn't complain:Adding a file descriptor to the bit vector:$fdvec = '';
And selecting/polling for ready descriptors:vec($fdvec, $fh->fileno, 1) = 1;
If I convert all of the above to a hash ref, i.e.$ready = select ($rout = $fdvec, undef, undef, $timeout);
Then I'm getting the error message. Is there something about using the hash ref with vec or select that is an issue?$fdvec ====> $this->{fdvec}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using vec/select with a hash ref
by ikegami (Patriarch) on Feb 03, 2009 at 23:52 UTC | |
|
Re: Using vec/select with a hash ref
by targetsmart (Curate) on Feb 04, 2009 at 06:18 UTC |