This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2014-07-23.00:49:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think that signal.set_wakeup_fd(fd) must set the file descriptor to the non-blocking mode, instead of requiring the file descriptor mode to be non-blocking.

Atttached patch implements this idea.

See also the issue #22018 which proposes to support sockets in signal.set_wakeup_fd(fd) on Windows.

We have to decide if signal.set_wakeup_fd() is supposed to support files or not on Windows. Non-blocking mode does not exist for files on Windows, only for sockets.

I didn't test my patch on Windows yet.

Note: the new _Py_set_blocking() function tries to use ioctl() instead of fnctl() when available to only use one syscall instead of two. I used the same optimization in _Py_set_inheritable().
Date User Action Args
2014-07-23 00:49:31vstinnersetrecipients: + vstinner
2014-07-23 00:49:30vstinnersetmessageid: <>
2014-07-23 00:49:30vstinnerlinkissue22042 messages
2014-07-23 00:49:30vstinnercreate