X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 27 Apr 2012 16:37:53 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Cygwin passes through null writes to other software when redirecting standard input/output (i.e. piping) Message-ID: <20120427143753.GO25385@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <020501cd23f2$20f07620$62d16260$@motionview3d.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <020501cd23f2$20f07620$62d16260$@motionview3d.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Apr 26 21:18, James Johnston wrote: > I have "run into an issue with Cygwin". This is arguably not a bug in > Cygwin, but in other platform runtime libraries. Never-the-less, the > symptoms occur only with Cygwin and not the Windows command prompt. So, > from a practical standpoint, Cygwin is "broken." This is almost certainly > the same issue mentioned in the "1.7.10->1.7.13 : output from .NET programs > does not get through pipeline to a visual c++ program" thread started by > cygwin AT alanhowells.e4ward.com last week. It's also related to the issue > I raised over a month ago, titled "Can't reliably redirect standard output > from C# program in recent Cygwin". > > To summarize: when piping output from one program to another (i.e. running > "A | B" command to pipe standard output from A to B's standard input), > Cygwin passes through ALL writes performed by a program to standard output > (and probably error), including null writes. What I don't grok is this: In your example, A and B are both native (== non-Cygwin) applications. As I already mentioned in another mail related to the .Net problem, while the Cygwin shell running at the time creates the pipe, it doesn't handle read and write calls on the pipe. It only creates the two native child processes and passes on the pipe handles. So in the end, there is no Cygwin process involved while the native processes are doing their reads and writes. It's all in the hands of these processes. There's no third process in the middle which handles the passing of information from A to B. So, what do you expect Cygwin to do? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple