delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/06/12:05:24

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=3.4 required=5.0 tests=AWL,BAYES_20,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F5643B8.2040708@caris.com>
Date: Tue, 06 Mar 2012 13:04:56 -0400
From: Edgar Ellis <edgar DOT ellis AT caris DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.10 : output from .NET programs does not get through pipeline
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

> 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

- Raw text -


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