From owner-svn-src-user@FreeBSD.ORG Fri Nov 8 10:57:18 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6BFF4F17; Fri, 8 Nov 2013 10:57:18 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F9842168; Fri, 8 Nov 2013 10:57:18 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 712B21203DC; Fri, 8 Nov 2013 11:57:03 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 45F55CB4E; Fri, 8 Nov 2013 11:57:03 +0100 (CET) Date: Fri, 8 Nov 2013 11:57:03 +0100 From: Jilles Tjoelker To: Colin Percival , src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r257602 - user/cperciva/panicmail Message-ID: <20131108105702.GA25448@stack.nl> References: <201311040300.rA430jCQ066512@svn.freebsd.org> <20131107223414.GH37879@caravan.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131107223414.GH37879@caravan.chchile.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 10:57:18 -0000 On Thu, Nov 07, 2013 at 11:34:15PM +0100, Jeremie Le Hen wrote: > On Mon, Nov 04, 2013 at 03:00:45AM +0000, Colin Percival wrote: > > Author: cperciva > > Date: Mon Nov 4 03:00:44 2013 > > New Revision: 257602 > > URL: http://svnweb.freebsd.org/changeset/base/257602 > > Log: > > Change > > local tmpfile=`mktemp` || exit 1 > > into > > local tmpfile > > tmpfile=`mktemp` || exit 1 > > since the former is parsed as "local || exit 1" and loses the exit code > > from mktemp. > > Submitted by: jilles > Out of curiosity, is this brokenness of local mandated by the standard? local is not in any standard, but this behaviour of command substitutions has been mandated for a long time. If there is a command word, the exit status is the exit status of that command word, not the exit status of a command substitution. On the other hand, in the original Bourne shell, it was possible to do things like set -- `getopt ab: $*`; errcode=$? Given that it already changed once, I think changing it back would be inappropriate and unlikely. -- Jilles Tjoelker