delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Tue, 12 Aug 2008 17:40:59 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Cc: | Dmitry Semyonov <linulin AT gmail DOT com> |
Subject: | Re: ash-20040127-3: Invalid behavior of negated pipeline |
Message-ID: | <20080812154059.GS5129@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com, Dmitry Semyonov <linulin AT gmail DOT com> |
References: | <ddc185be0808120836v7f00219br31952f20089f052 AT mail DOT gmail DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <ddc185be0808120836v7f00219br31952f20089f052@mail.gmail.com> |
User-Agent: | Mutt/1.5.16 (2007-06-09) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
On Aug 12 19:36, Dmitry Semyonov wrote: > Hello all, > > -- begin -- > $ bash -c '! true | false; echo $?' > 0 > > $ ash -c '! true | false; echo $?' > 1 > -- end -- > > Mostly "if" conditions are affected by this issue. > > Quote[1] from the "Shell Command Language" standard: "If the reserved > word ! does not precede the pipeline, the exit status shall be the > exit status of the last command specified in the pipeline. Otherwise, > the exit status shall be the logical NOT of the exit status of the > last command. That is, if the last command returns zero, the exit > status shall be 1; if the last command returns greater than zero, the > exit status shall be zero." > > [1] http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_02 > > > So, in this particular case, ash is not compliant with the standard, > nor it is compatible with bash or dash (Debian ash derivative). Use bash as sh. ash is only in the distro to run rebaseall. I won't release a new version of ash any time soon, if it doesn't explicitely affect rebase. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |