[issue10802] python3.2 AFTER b2 release has subprocess.Popen broken under colinux/windows
kai zhu
report at bugs.python.org
Sun Jan 2 09:59:42 CET 2011
kai zhu <kaizhu256 at gmail.com> added the comment:
tested w/ following debug code. looks like greg is correct - HAVE_PIPE2 should NOT b defined under colinux.
diff -r 6fa1e3b94d8f Modules/_posixsubprocess.c
--- a/Modules/_posixsubprocess.c Sat Jan 01 22:18:46 2011 +0100
+++ b/Modules/_posixsubprocess.c Sun Jan 02 03:48:47 2011 -0500
@@ -412,10 +412,12 @@
int fds[2];
int res;
#ifdef HAVE_PIPE2
+ PyErr_Format(PyExc_RuntimeError, "HAVE_PIPE2 = %i, O_CLOEXEC = %i", HAVE_PIPE2, O_CLOEXEC); return NULL;
Py_BEGIN_ALLOW_THREADS
res = pipe2(fds, O_CLOEXEC);
Py_END_ALLOW_THREADS
#else
+ PyErr_Format(PyExc_RuntimeError, "HAVE_PIPE2 not defined, O_CLOEXEC = %i", O_CLOEXEC); return NULL;
/* We hold the GIL which offers some protection from other code calling
* fork() before the CLOEXEC flags have been set but we can't guarantee
* anything without pipe2(). */
b2 release:
./python -c 'import _posixsubprocess; _posixsubprocess.cloexec_pipe()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
RuntimeError: HAVE_PIPE2 not defined, O_CLOEXEC = 524288
latest hg:
./python -c 'import _posixsubprocess; _posixsubprocess.cloexec_pipe()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
RuntimeError: HAVE_PIPE2 = 1, O_CLOEXEC = 524288
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10802>
_______________________________________
More information about the Python-bugs-list
mailing list