public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Edgar Ellis <edgar.ellis@caris.com>
To: cygwin@cygwin.com
Subject: Re: 1.7.10 : output from .NET programs does not get through pipeline
Date: Tue, 06 Mar 2012 17:05:00 -0000	[thread overview]
Message-ID: <4F5643B8.2040708@caris.com> (raw)

> Hi all,
>
> I started observing some very strange effects when launching .NET
> programs from cygwin, after upgrading to version 1.7.10.
> The example below is using the MSBuild.exe as an example, but I get
> analogous results with any console program compiled for .NET.
> One can see that each pipeline  works normally exactly once. The
> second time the pipe does not bring anything.
> I do not know if it is possible to reset it; killing all cygwin
> processes and logging off apparently does not help.
>
> $  MSBuild.exe -version
> Microsoft (R) Build Engine Version 3.5.30729.1
> [Microsoft .NET Framework, Version 2.0.50727.3625]
> Copyright (C) Microsoft Corporation 2007. All rights reserved.
>
> 3.5.30729.1
>
> $ MSBuild.exe -version | head -1
> Microsoft (R) Build Engine Version 3.5.30729.1
>
> $ MSBuild.exe -version | head -1
>
> $ MSBuild.exe -version | wc
>       4      20     177
>
> $ MSBuild.exe -version | wc
>       0       0       0
>

Hi,

I hit the same issue with msbuild and was able to work around it by 
doing a pipe in cmd.exe, eg:

$ cmd.exe '/c' 'msbuild.exe -version' | wc
       0       0       0

$ cmd.exe '/c' 'msbuild.exe -version | cat' | wc
       4      20     183



- Edgar


> One program that surprisingly does not get broken so easily is "perl"
>
> $ MSBuild.exe -version   | perl -ne print | wc
>       4      20     177
>
> $ MSBuild.exe -version   | perl -ne print | wc
>       4      20     177
>
> Output from normal DOS, windows and cygwin programs is not affected.
>
> Output redirection with ">" works as usual.
>
> Command substitution with $(  ) or ` ` does not work if the output
> comes from .NET program:
>
> $ echo +++ `MSBuild /help` +++
> +++ +++
>
> $ echo +++ `MSBuild.exe /help>tmp.tmp ; dos2unix tmp.tmp; head tmp.tmp` +++
> dos2unix: converting file tmp.tmp to Unix format ...
> +++ Microsoft (R) Build Engine Version 3.5.30729.1 [Microsoft .NET
> Framework, Version 2.0.50727.3625] Copyright (C) Microsoft Corporation
> 2007. All rights reserved. Syntax: MSBuild.exe [options] [project
> file] Description: Builds the specified targets in the project file.
> If a project file is not specified, MSBuild searches the current
> working directory for a file that has a file extension that ends in
> "proj" and uses that file. +++
>
> I get similar results on other computers running Windows XP, Vista and
> 7 with 1.7.10 installed, but not with 1.7.9.
>
> Have you seen anything like this? How can it be fixed?
>
> Regards
> Ilya Beylin


--
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

             reply	other threads:[~2012-03-06 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 17:05 Edgar Ellis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-26 16:00 David Kerrawn
2012-03-26 16:42 ` Christopher Faylor
2012-03-27  8:53   ` David Kerrawn
2012-02-23 16:19 Ilya Beylin

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=4F5643B8.2040708@caris.com \
    --to=edgar.ellis@caris.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).