http://qs1969.pair.com?node_id=427079


in reply to What makes IO::Select::can_read return?

One possibility, (from the man page for the select system call)...
Any signal will cause select to return immediately. So if your program uses signals, you can't rely on select to keep waiting for the full time specified. If you want to be sure of waiting for a particular amount of time, you must check for EINTR and repeat the select with a newly calculated timeout based on the current time. See the example below.

I don't really know how Perl ends up wrapping the underlying system call. Might be something to check into.


-- All code is 100% tested and functional unless otherwise noted.