New submission from Antoine Pitrou <pit...@free.fr>:

The select() and poll() loop implementations of Popen.communicate() call 
os.write() instead of the write() method on the stdin pipe, meaning any newline 
translation *and* unicode-to-bytes encoding step is skipped.

To use the write() method on the stdin pipe, we may have to set the file 
descriptor in non-blocking mode, especially given that _PIPE_BUF worth of 
characters can amount to more than _PIPE_BUF bytes on the underlying raw fd.

See issue12591 for a simpler issue that was fixed.

----------
components: Library (Lib)
messages: 141014
nosy: gregory.p.smith, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: "universal newlines" subprocess support broken with select- and 
poll-based communicate()
type: behavior
versions: Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12623>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to