Subject: | no way to detect errors and documentation issue |
Hello.
Correct me if I wrong.
Show quoted text
> select ( READ, WRITE, EXCEPTION [, TIMEOUT ] )
> ...
> " Upon error an empty list is returned."
however, empty list will be returned when core select() return 0 or -1. in both cases.
And I think "-1" is "error" code (i.e. errno $! is set), while "0" is not error (one should not test errno).
So, documentation is wrong.
Also there is no way to check for errors in other methods, like can_read etc.
It would be pretty useful to handle errors, like EINTR, and distinct it from other conditions (like timeout and (not sure) eof in filehandles).