Message223710
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:31 | vstinner | set | recipients:
+ vstinner |
2014-07-23 00:49:30 | vstinner | set | messageid: <1406076570.98.0.190305939229.issue22042@psf.upfronthosting.co.za> |
2014-07-23 00:49:30 | vstinner | link | issue22042 messages |
2014-07-23 00:49:30 | vstinner | create | |
|