Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Help with pipes, buffering and pseudoterminals Date: Wed, 08 Apr 2015 12:23:24 +1200 Lines: 15 Message-ID: References: <20150407054803.GA80257@cskk.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net dOEgdGTJU8FlIaBdFPP6IwiHYXbOV+tDG+kPjvrDNKUZ7OKedi Cancel-Lock: sha1:b89S0d/5rYO6V4WVS1Ev1JXY85k= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:88636 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 foo -- Greg