From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23085 invoked by alias); 13 May 2015 08:16:59 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 23075 invoked by uid 89); 13 May 2015 08:16:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: cluster-j.mailcontrol.com Received: from cluster-j.mailcontrol.com (HELO cluster-j.mailcontrol.com) (85.115.54.190) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 13 May 2015 08:16:56 +0000 Received: from schaeffler.com ([159.51.236.205]) by rly24j.srv.mailcontrol.com (MailControl) with ESMTP id t4D8GqYg016572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 13 May 2015 09:16:52 +0100 Received: from DE011525.schaeffler.com (unknown [10.160.73.31]) by Websense Email Security Gateway with ESMTPS id 0C0B49B2C3613 for ; Wed, 13 May 2015 10:16:52 +0200 (CEST) Received: from de011521.schaeffler.com ([169.254.2.66]) by DE011525.schaeffler.com ([10.160.73.31]) with mapi id 14.03.0210.002; Wed, 13 May 2015 10:16:52 +0200 From: "Lemke, Michael ST/HZA-ZSW" To: "cygwin@cygwin.com" Subject: RE: cygwin 2.0.2, make 4.1: stderr redirect append does not work with native Windows programs Date: Wed, 13 May 2015 10:34:00 -0000 Message-ID: <33EC3398272FBE47B64EE3B3E98F69A76C42903B@de011521.schaeffler.com> References: <5551188B.7050503@coverity.com> <55525B85.90001@coverity.com> In-Reply-To: <55525B85.90001@coverity.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00143.txt.bz2 On May 12, 2015 9:59 PM Scott McPeak wrote: > >Using 32-bit cygwin 2.0.2 and make 4.1-1, in a recipe, redirecting >stderr in append mode does not work if the program being invoked on a >shell line is a native Windows executable. Instead of appending, the >stderr output is written to the top of the file, corrupting it. This >happens only if the 'make' process has its own stdout/err redirected to >a pipe. > >Example recipe: > > all: > echo first > output > echo >secondxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >> output > /cygdrive/c/Windows/System32/sort.exe nonexist 2>> output; tr= ue > >When "make" is run, the "output" file should be: > > first > secondxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > nonexistThe system cannot find the file specified. > >and in fact it is. But when "make 2>&1 | cat" is run, the output is: > > nonexistThe system cannot find the file specified. > xxxxxxxxxxxxxx > >even though it should be the same as before. The error message written >by sort.exe went to the top of the file instead of the end. Just a wild guess here: line endings? Try=20 make 2>&1 | cat -A=20 and see if everything's there. Michael -- 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