delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/05/13/04:17:18

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=Oph6DFjwyeB/KT8SjOfhZNoYh39Z+
7XpiF4U8fiRfEtcQpUn6rHVhF0F/qS8G+KJiW/rvrWQFYJKdrYJ7re2YRj2zeNeP
vQUQE+sJYmKA3vtDOYKy7bQhkayNGcPVaQDJY04yhwwX18qmHu3isy/kYbTVvHTy
Hwe6E0u1s7qZAo=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=G6dVNZhNbrvUMWbsdJG/lAtcPqc=; b=VJc
GqljBTxXg+BQicjY0IMMF2TI6yyccCbaKFXnFfdK4qJonnusy24ohi6BRBNDKQSG
qVvTfIeKvkPHp/CxFJwo+pQDIwJCmqjmJWsc2Qr9+CJZdjAjf0Gn33ksvMSsMtAo
cjtb6jDfF1u70819IRSDwj9V+4wqQkWUnwpfJMjQ=
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
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
From: "Lemke, Michael ST/HZA-ZSW" <lemkemch AT schaeffler DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT 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 08:16:51 +0000
Message-ID: <33EC3398272FBE47B64EE3B3E98F69A76C42903B@de011521.schaeffler.com>
References: <5551188B DOT 7050503 AT coverity DOT com> <55525B85 DOT 90001 AT coverity DOT com>
In-Reply-To: <55525B85.90001@coverity.com>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t4D8HECd014107

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

make 2>&1 | cat -A 

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


- Raw text -


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