![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Re: select($rin,undef,undef,undef) only blocking onceby Tanalis (Curate) |
on Jul 26, 2005 at 10:14 UTC ( #478131=note: print w/replies, xml ) | Need Help?? |
The select function makes use of the C select(2) system call.
As the docs for select(2) state, file descriptors "will be watched to see if characters become available for reading (more precisely, to see if a read will not block ... a file descriptor is also ready on end-of-file)" Once you've read data from the pipe once, the file pointer will be pointing at EOF, and hence the select call will always return ready. In a situation like this, I would consider using a blocking read over blocking on file readiness; Hope that helps. -- Foxcub
In Section
Seekers of Perl Wisdom
|
|