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.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com