[issue22018] Add a new signal.set_wakeup_socket() function

Charles-François Natali report at bugs.python.org
Fri Jul 25 09:02:54 CEST 2014


Charles-François Natali added the comment:

> Pipes cannot be configured in non-blocking mode on Windows. It sounds dangerous to call a blocking syscall in a signal handler.
>
> In fact, it works to write the signal number into a pipe on Windows, but I'm worried about the blocking behaviour.

OK, but if someone passes a socket in blocking mode, it will be accepted.
I don't understand why, if you're worried about a blocking write, you
don't just check that the FD passed is in non-blocking mode. It's
conceptually cleaner, more direct and safer.

Also, I think there's another issue open on the tracker to check just
that, so I'd leave this check out here.

----------

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


More information about the Python-bugs-list mailing list