[issue20866] segfailt with os.popen and SIGPIPE
Terry J. Reedy
report at bugs.python.org
Fri Mar 14 22:19:19 CET 2014
Terry J. Reedy added the comment:
Your example is ambiguous at to which of two pipings causes the problem. First you cat a large file into the script, which reads it in its entirety with "data = sys.stdin.read()". If that causes the segfault, they everything that follows is irrelevant. If that works and it is the second piping out that is the problem, then the rigamarole with creating an external file and piping it in irrelevant. "data = '0123456789' * 10000" would be sufficient.
In 2.6/7, os.popen is deprecated in favor of using subprocess. In 3.x, popen was, I have been told, re-written to use subprocess. So if popen is the problem here, then the fix is to use subprocess explicitly in 2.7.
----------
nosy: +terry.reedy
stage: -> test needed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20866>
_______________________________________
More information about the Python-bugs-list
mailing list