[issue16105] Pass read only FD to signal.set_wakeup_fd

Charles-François Natali report at bugs.python.org
Wed Oct 3 20:19:19 CEST 2012


Charles-François Natali added the comment:

>> Why limit to EBADF? You could also have EPIPE, EINVAL and many other errors.
>> The only error you may not want to report is EAGAIN.
>
> Charles,
> You're right! If all errno cases get covered in the patch,  will It looks reasonable?

Raising an error in case the signal can't be written to the FD
(because the other end didn't drain the pipe/socket) seems reasonable.
You should just retry on EINTR (although any sane implementation
shouldn't return EINTR on non-blocking write, I don't think it's
strictly prohibited by POSIX).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16105>
_______________________________________


More information about the Python-bugs-list mailing list