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 neologix, pitrou, python-dev, vstinner
Date 2014-07-29.22:22:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406672565.3.0.104063734548.issue22042@psf.upfronthosting.co.za>
In-reply-to
Content
I commited my patch to support sockets in signal.set_wakeup_fd() on Windows.

I updated my patch. It doesn't change signal.set_wakeup_fd() on Windows anymore. It only raises an exception on POSIX if the file descriptor is blocking.

On Windows, it's not possible to make a file non-blocking and so the signal handler may block on writing in the file. Antoine Pitrou doesn't want to change the behaviour, he prefers to still support files even if there is the possible hang.

On Windows, it's not possible to check if a socket handle is blocking or not. So set_wakeup_fd() doesn't check if the socket is blocking or not on Windows.

At least, the check can be implemented on POSIX.

--

An alternative is to make the file descriptor non-blocking in set_wakeup_fd(). In this case, I suggest to drop support of files on Windows because files cannot be set in non-blocking mode.
History
Date User Action Args
2014-07-29 22:22:45vstinnersetrecipients: + vstinner, pitrou, neologix, python-dev
2014-07-29 22:22:45vstinnersetmessageid: <1406672565.3.0.104063734548.issue22042@psf.upfronthosting.co.za>
2014-07-29 22:22:45vstinnerlinkissue22042 messages
2014-07-29 22:22:45vstinnercreate