Translate select.error into IOError for EINTR to be consistent with select.poll()
Translate OSError into IOError for EINTR to be consistent with select.poll()