[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: I'm no longer interested in solving the SIGINT event problem locally at the wait site. A common implementation of _Py_Sleep, _Py_WaitForSingleObject, and _Py_WaitForMultipleObjects is needed. _winapi.WaitForSingleObject would call _Py_WaitForSingleObject and

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread STINNER Victor
STINNER Victor added the comment: > I decided to make it an error to pass an empty sequence It makes sense since the original WaitForMultipleObjects() also requires at least one object: https://msdn.microsoft.com/en-us/library/windows/desktop/ms687025(v=vs.85).aspx nCount [in] The

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread STINNER Victor
STINNER Victor added the comment: Oh nice, you implemented the PEP 475 for _winapi.WaitForMultipleObjects()! I missed this function when implementing this PEP :-) -- nosy: +haypo ___ Python tracker

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread Eryk Sun
Eryk Sun added the comment: Hopefully this is my last change until someone reviews this. I decided to make it an error to pass an empty sequence, which previously would implicitly wait on the SIGINT event. This way simplifies the code and prevents someone from accidentally waiting forever on

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread Eryk Sun
Changes by Eryk Sun : Added file: http://bugs.python.org/file44698/issue_28168_03.patch ___ Python tracker ___

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread Eryk Sun
Changes by Eryk Sun : Removed file: http://bugs.python.org/file44673/issue_28168_01.patch ___ Python tracker ___

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread Eryk Sun
Changes by Eryk Sun : Removed file: http://bugs.python.org/file44674/issue_28168_02.patch ___ Python tracker ___

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-15 Thread Eryk Sun
Changes by Eryk Sun : Added file: http://bugs.python.org/file44674/issue_28168_02.patch ___ Python tracker ___

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-15 Thread Eryk Sun
Eryk Sun added the comment: This patch makes the trivial change to the Popen.wait() method and also modifies _winapi.WaitForMultipleObjects to restart the wait if SIGINT is ignored or the handler didn't raise an exception. -- keywords: +patch stage: needs patch -> patch review Added

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-15 Thread Eryk Sun
New submission from Eryk Sun: On Unix, waiting on an instance of subprocess.Popen in the main thread is interruptible by Ctrl+C. On Windows, it currently calls _winapi.WaitForSingleObject, which isn't interruptible. It should instead call _winapi.WaitForMultipleObjects, which automatically