[issue40913] time.sleep ignores errors on Windows

Eryk Sun report at bugs.python.org
Wed Jun 10 15:36:50 EDT 2020


Eryk Sun <eryksun at gmail.com> added the comment:

> is there any straightforward way to cause WaitForSingleObjectEx to fail?

The wait can fail for ERROR_INVALID_HANDLE or ERROR_ACCESS_DENIED (i.e. the handle lacks SYNCHRONIZE access). If _PyOS_SigintEvent were replaced with get/set functions, then a non-waitable handle could be set temporarily via ctypes.

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40913>
_______________________________________


More information about the Python-bugs-list mailing list