A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-January/085483.html below:

[Python-Dev] subprocess crossplatformness and async communication

[Python-Dev] subprocess crossplatformness and async communication [Python-Dev] subprocess crossplatformness and async communicationHrvoje Niksic hrvoje.niksic at avl.com
Mon Jan 26 14:10:04 CET 2009
Nick Craig-Wood wrote:
> But for the conversational case (eg using it to do a remote login) it
> doesn't work at all :-
> 
>   run child
>   send stuff to stdin
>   child reads stdin and writes stdout

Can this really be made safe without an explicit flow control protocol, 
such as a pseudo-TTY?  stdio reads data from pipes such as stdin in 4K 
or so chunks.  I can easily imagine the child blocking while it waits 
for its stdin buffer to fill, while the parent in turn blocks waiting 
for the child's output arrive.

Shell pipelines (and the subprocess module as it stands) don't have this 
problem because they're unidirectional: you read input from one process 
and write output to another, but you typically don't feed data back to 
the process you've read it from.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4