From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Can't reliably redirect standard output from C# program in recent Cygwin
Date: Mon, 12 Mar 2012 22:02:00 -0000 [thread overview]
Message-ID: <20120312220204.GA29921@ednor.casa.cgf.cx> (raw)
In-Reply-To: <00cf01cd0075$8430b290$8c9217b0$@motionview3d.com>
On Mon, Mar 12, 2012 at 05:28:17PM -0000, James Johnston wrote:
>Well, good call. I shouldn't have jumped to conclusions. Both my C++
>and C# examples still fail:
Not really a call. It was obviously different failure. The previous
fix wasn't even pipe related.
But, regardless, Corinna (who has more time these days to look into
this type of thing) found a damning piece of MSDN documentation which
indicates that a write of zero bytes to a pipe will cause a read of
zero bytes on the other end of the pipe. So, a program which assumes
that a zero byte read means EOF, like most Linux programs, will stop
processing when it sees the zero bytes from ReadFile.
Corinna sent me a patch to fix the problem which I've mildly tweaked and
installed. It's in the latest snapshot.
cgf
--
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
next prev parent reply other threads:[~2012-03-12 22:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-08 21:17 James Johnston
2012-03-08 22:18 ` James Johnston
2012-03-09 1:24 ` Bill Meier
2012-03-09 3:09 ` marco atzeri
2012-03-09 18:49 ` James Johnston
2012-03-09 18:47 ` James Johnston
2012-03-09 19:53 ` Corinna Vinschen
2012-03-11 1:33 ` Christopher Faylor
2012-03-12 14:05 ` James Johnston
2012-03-12 14:20 ` Corinna Vinschen
2012-03-12 17:30 ` James Johnston
2012-03-12 22:02 ` Christopher Faylor [this message]
2012-03-13 14:58 ` James Johnston
2012-03-12 14:58 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120312220204.GA29921@ednor.casa.cgf.cx \
--to=cgf-use-the-mailinglist-please@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).