From: Leonard Crestez <report@bu...> - 2013-10-03 14:37:06
New submission from Leonard Crestez:
for i in `seq 10`; do
echo -n O >&1
echo -n E >&2
When running subproc_call.py with cpython the output is always OEOEOEOEOEOEOEOEOEOE, as expected. When running with jython the output is usually OOOOOOOOOOEEEEEEEEEE but other variants are also possible.
The documentation of subprocess.Popen states by default "no redirection will occur; the child’s file handles will be inherited from the parent". Jython behaves differently in a way that introduces visible behavior changes.
Jython Popen with stdout=subprocess.PIPE and stderr.subprocess.STDOUT apparently behaves as expected. This can also happen if entire lines are printed, or with manual flushes. The following cpython print script also reproduces the issue:
#! /usr/bin/env python
for i in range(50):
title: subprocess.call with no redirection breaks stdout/stderr mingling
versions: Jython 2.7
Jython tracker <report@...>
Get latest updates about Open Source Projects, Conferences and News.