[issue22042] signal.set_wakeup_fd(fd): set the fd to non-blocking mode

STINNER Victor report at bugs.python.org
Wed Jul 23 04:15:19 CEST 2014


STINNER Victor added the comment:

"Also, given set_wakeup_fd() is rather specialized and uncommon, I don't see much point in making it more convenient."

The problem is that passing a blocking file descriptor can block the whole Python process. The hang does not occur immediatly, but only when the pipe is full for example, which may only occur in some corner cases (ex: heavy system load, slow network, etc.).

The minimum would be to raise an error if the file descriptor is in blocking mode.

----------

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


More information about the Python-bugs-list mailing list