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; alternatively, look into the use of seek or sysseek to try to clear the file's EOF condition (which may not be possible - I can't test it here).
Hope that helps.
-- Foxcub
#include www.liquidfusion.org.uk
In reply to Re: select($rin,undef,undef,undef) only blocking once
by Tanalis
in thread select($rin,undef,undef,undef) only blocking once
by rabbit7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |