Help with pipes, buffering and pseudoterminals

Nobody nobody at nowhere.invalid
Sun Apr 5 20:06:46 EDT 2015


On Sun, 05 Apr 2015 12:20:48 -0700, Daniel Ellis wrote:

> This only seems to print from the parent process.  I read that I need to
> do the os.read call for the fork to happen.  I've also tried printing
> *after* the os.read call.

The child process has its std{in,out,err} attached to the newly-created
pty, so that's where the output from the child's "print" goes.

You'll see that output if the parent prints the string returned from the
os.read() call.




More information about the Python-list mailing list