Issue 12493: subprocess: Popen.communicate() doesn't handle EINTR in some cases (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/56702
classification
Title: | subprocess: Popen.communicate() doesn't handle EINTR in some cases | ||
---|---|---|---|
Type: | Stage: | ||
Components: | Library (Lib) | Versions: | Python 3.2, Python 3.3, Python 2.7 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | Nosy List: | neologix, python-dev, vstinner | |
Priority: | normal | Keywords: | patch |
Created on 2011-07-04 22:03 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
subprocess_communicate_eintr.patch | vstinner,2011-07-04 22:03 | review |
Messages (5) | ||
---|---|---|
msg139811 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2011-07-04 22:03 |
subprocess.Popen.communicate() doesn't catch EINTR error if it is called without timeout and if there is only one PIPE (stdout or stderr). Attached patch fixes these cases. It may need a test. I found this bug while working on test_signal, especially on the inter process signal tests. | ||
msg139860 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2011-07-05 12:08 |
New changeset dcfacc2d93b4 by Victor Stinner in branch '3.2': Issue #12493: subprocess: communicate() handles EINTR http://hg.python.org/cpython/rev/dcfacc2d93b4 New changeset 42e23db3ddfc by Victor Stinner in branch 'default': (merge 3.2) Issue #12493: subprocess: communicate() handles EINTR http://hg.python.org/cpython/rev/42e23db3ddfc New changeset 6a28ccde2f1b by Victor Stinner in branch '2.7': Issue #12493: subprocess: communicate() handles EINTR http://hg.python.org/cpython/rev/6a28ccde2f1b | ||
msg139867 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2011-07-05 12:51 |
New changeset 807921ba241d by Victor Stinner in branch '3.2': Issue #12493: skip test_communicate_eintr() if signal.SIGALRM is missing http://hg.python.org/cpython/rev/807921ba241d New changeset 4928cf093a11 by Victor Stinner in branch 'default': (merge 3.2) Issue #12493: skip test_communicate_eintr() if signal.SIGALRM is missing http://hg.python.org/cpython/rev/4928cf093a11 New changeset 8a4c9c154b5d by Victor Stinner in branch '2.7': Issue #12493: skip test_communicate_eintr() if signal.SIGALRM is missing http://hg.python.org/cpython/rev/8a4c9c154b5d | ||
msg139925 - (view) | Author: Charles-François Natali (neologix) * ![]() |
Date: 2011-07-06 06:58 |
Out of curiosity, how could SIGALRM be missing on a Unix system? Maybe you mean something like @unittest.skipUnless(hasattr(errno, EINTR), "Requires errno.EINTR") | ||
msg139928 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2011-07-06 08:50 |
> Out of curiosity, how could SIGALRM be missing on a Unix system? It is only missing on Windows. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:19 | admin | set | github: 56702 |
2011-07-06 08:50:41 | vstinner | set | messages: + |
2011-07-06 06:58:17 | neologix | set | nosy: + neologixmessages: + |
2011-07-05 12:51:04 | python-dev | set | messages: + |
2011-07-05 12:09:30 | vstinner | set | status: open -> closedresolution: fixed |
2011-07-05 12:08:18 | python-dev | set | nosy: + python-devmessages: + |
2011-07-04 22:03:09 | vstinner | create |