in reply to What makes IO::Select::can_read return?
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: What makes IO::Select::can_read return?
by sleepingsquirrel (Chaplain) on Feb 01, 2005 at 23:16 UTC | |
Re^2: What makes IO::Select::can_read return?
by beemshake (Novice) on Feb 02, 2005 at 17:19 UTC |