Wiggins has asked for the wisdom of the Perl Monks concerning the following question:
I start by looking up Perl's handling of a TIMEOUT by IO:Select :
perldoc IO::Socket saysRather terse and not of much help. This will not be a trivial quest! Me thinks there will be much testing and gnashing of teeth.
"TIMEOUT" is optional and has the same effect as for the core select call.
perldoc -f select saysIs a timeout treated as an error? Questing on leading to
The timeout, if specified, is in seconds, which may be fractional.
...
On error, "select" behaves like the select(2) system call : it returns -1 and sets $!.
man 2 select saysGashing of teeth begins quickly...
return the number of file descriptors contained in the three returned descriptor sets (that is, the total number of bits that are set in readfds, writefds, exceptfds) which may be zero if the timeout expires before anything interesting happens.
...
On error, -1 is returned, and errno is set appropriately; the sets and timeout become undefined, so do not rely on their contents after an error.
It is always better to have seen your target for yourself, rather than depend upon someone else's description.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Msg.pm extended with "workproc". IO::Select docs
by Wiggins (Hermit) on Oct 10, 2009 at 20:40 UTC | |
|
timeouts and errors with IO::Select:: and CORE:: select (was Re: Msg.pm extended with "workproc". IO::Select docs)
by ikegami (Patriarch) on Oct 11, 2009 at 18:28 UTC | |
by Wiggins (Hermit) on Oct 12, 2009 at 13:15 UTC | |
by ikegami (Patriarch) on Oct 12, 2009 at 17:13 UTC |