1.7.10 : output from .NET programs does not get through pipeline

Edgar Ellis edgar.ellis@caris.com
Tue Mar 6 17:05:00 GMT 2012


> 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



More information about the Cygwin mailing list