delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/27/10:38:52

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 <corinna-cygwin AT cygwin DOT com>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019