[Python-checkins] cpython (merge 3.4 -> default): merge the end_fd comment fix and explicit wait() for the child.
gregory.p.smith
python-checkins at python.org
Sun Jun 1 22:47:46 CEST 2014
http://hg.python.org/cpython/rev/e0bc42883ecd
changeset: 90951:e0bc42883ecd
parent: 90948:012329c8c4ec
parent: 90950:784bd2c37d52
user: Gregory P. Smith <greg at krypto.org>
date: Sun Jun 01 13:47:34 2014 -0700
summary:
merge the end_fd comment fix and explicit wait() for the child.
files:
Lib/test/test_subprocess.py | 2 +-
Modules/_posixsubprocess.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1966,7 +1966,7 @@
import subprocess, sys
subprocess.Popen([sys.executable, {fd_status!r}] +
[str(x) for x in range({max_fd})],
- close_fds=True)
+ close_fds=True).wait()
""".format(fd_status=fd_status, max_fd=max_fd_open+1))],
stdout=subprocess.PIPE, close_fds=False)
finally:
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -234,8 +234,8 @@
char d_name[256]; /* Filename (null-terminated) */
};
-/* Close all open file descriptors in the range start_fd inclusive to end_fd
- * exclusive. Do not close any in the sorted py_fds_to_keep list.
+/* Close all open file descriptors in the range from start_fd and higher
+ * Do not close any in the sorted py_fds_to_keep list.
*
* This version is async signal safe as it does not make any unsafe C library
* calls, malloc calls or handle any locks. It is _unfortunate_ to be forced
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list