homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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) * (Python committer) 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) (Python triager) 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) (Python triager) 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) * (Python committer) 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) * (Python committer) 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:19adminsetgithub: 56702
2011年07月06日 08:50:41vstinnersetmessages: + msg139928
2011年07月06日 06:58:17neologixsetnosy: + neologix
messages: + msg139925
2011年07月05日 12:51:04python-devsetmessages: + msg139867
2011年07月05日 12:09:30vstinnersetstatus: open -> closed
resolution: fixed
2011年07月05日 12:08:18python-devsetnosy: + python-dev
messages: + msg139860
2011年07月04日 22:03:09vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /