Help with pipes, buffering and pseudoterminals

Gregory Ewing greg.ewing at
Wed Apr 8 02:23:24 CEST 2015

Chris Angelico wrote:
> Really? I can believe that stdout and stderr are initially duplicates,
> but stdin as well? Isn't stdin opened for reading only, and
> stdout/stderr for writing only?

It depends entirely on how the process that forked your
shell process set things up, but a quick experiment I
just did in a MacOSX terminal window suggests that it's
not really bothered about that distinction:

sh-3.2$ echo foo >&0


More information about the Python-list mailing list