This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin passes through null writes to other software when redirecting standard input/output (i.e. piping)

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 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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]