[OT] select and sysread problem on solaris

Mark Overmeer mark at overmeer.net
Thu Sep 11 11:54:56 BST 2008


* Dirk Koopman (djk at tobit.co.uk) [080911 10:25]:
> Any tutorial on the use of select() should really mandate the use of 
> O_NONBLOCK so that one can capture the EAGAIN/EWOULDBLOCK/EINPROGRESS 
> error(s) and then ignore them. If your sysread returns UNDEF, then check 
> for these errors in $! and just carry on, otherwise signal EOF in the 
> normal way.

IO::Multiplex (by coincedence also discussed for other reasons on
perl5-porters today) is a nice example implementation for this problem.
-- 
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net



More information about the london.pm mailing list