Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re: select($rin,undef,undef,undef) only blocking once
by Tanalis
|
|