[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 583be15e22ca by Victor Stinner in branch 'default': Issue #12462: time.sleep() now calls immediatly the (Python) signal handler if http://hg.python.org/cpython/rev/583be15e22ca -- nosy: +python-dev ___ P

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > My new patch is more explicit: only add a special case for the select > implementation, if errno is EINTR. Looks good to me! -- ___ Python tracker _

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: The sleep implementation of floatsleep() doesn't call PyErr_SetFromErrno() if errno is EINTR, whereas EINTR indicates that select() was interrupted. I agree that PyErr_CheckSignals() is overkill in the Windows implementation. My new patch is more explicit: on

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: You don't *need* to call PyErr_CheckSignals() explicitly, PyErr_SetFromErrno() does it for you. -- ___ Python tracker ___

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread STINNER Victor
New submission from STINNER Victor : While reading floatsleep() (time.sleep) code for issue #12459, I noticed that the Python signal handler is not called in floatsleep() if a signal interrupted the sleep. Well, it just "works" because the bytecode evaluation loop will call PyErr_CheckSignals(