From owner-svn-src-all@FreeBSD.ORG Tue Aug 24 17:57:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D6CD1065693; Tue, 24 Aug 2010 17:57:57 +0000 (UTC) (envelope-from prvs=18452e48d6=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 29D168FC19; Tue, 24 Aug 2010 17:57:56 +0000 (UTC) Received: from pd2ml3so-ssvc.prod.shaw.ca ([10.0.141.148]) by pd2mo1so-svcs.prod.shaw.ca with ESMTP; 24 Aug 2010 11:42:55 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=1h8qd3w5pbyJS47frJc7V6h9QwwiBhgsQMy9mbCO+wA= c=1 sm=1 a=VXq8tsqEoNMA:10 a=VphdPIyG4kEA:10 a=ORa4HqFjfvEA:10 a=kj9zAlcOel0A:10 a=MJPcHhXccCG8eBs0us8XwA==:17 a=MMwg4So0AAAA:8 a=6I5d2MoRAAAA:8 a=ewjxO-GcL1C7YubkKKgA:9 a=2myJdMm-X2qSscJqIk0A:7 a=l25c9elb4Vz6ucGck8InoVQsdIsA:4 a=CjuIK1q_8ugA:10 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd2ml3so-dmz.prod.shaw.ca with ESMTP; 24 Aug 2010 11:42:55 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 6B889C433AC_C74043BB; Tue, 24 Aug 2010 17:41:15 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id DF96DC460F7_C740437F; Tue, 24 Aug 2010 17:41:11 +0000 (GMT) Received: from localhost (brian@gw.lan.Awfulhak.org [172.16.0.1]) by gw.Awfulhak.org (8.14.4/8.14.4) with ESMTP id o7OHfBDT046997; Tue, 24 Aug 2010 10:41:11 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Tue, 24 Aug 2010 10:43:07 -0700 From: Brian Somers To: Jilles Tjoelker Message-ID: <20100824104307.54ca6c2a@FreeBSD.org> In-Reply-To: <20100823215850.GC67671@stack.nl> References: <201008221104.o7MB4Ung001538@svn.freebsd.org> <20100823003314.57d41b94@dev.lan.Awfulhak.org> <20100823215850.GC67671@stack.nl> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r211609 - head/tools/regression/bin/sh/builtins X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 17:57:57 -0000 On Mon, 23 Aug 2010 23:58:50 +0200, Jilles Tjoelker wrote: [.....] > > > ============================================================================== > > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > > +++ head/tools/regression/bin/sh/builtins/break3.0 Sun Aug 22 11:04:30 2010 (r211609) > > > @@ -0,0 +1,15 @@ > > > +# $FreeBSD$ > > > + > > > +# We accept this and people might rely on it. > > > +# However, various other shells do not accept it. > > > + > > > +f() { > > > + break > > > + echo bad1 > > > +} > > > + > > > +while :; do > > > + f > > > + echo bad2 > > > + exit 2 > > > +done [.....] > > Having said that, this behaviour is the same in bash except that bash > > will complain if it's asked to break when the context is wrong, > > perhaps we should complain too? [.....] > Warning messages to stderr mostly get lost in the noise, I don't really > like them. I do not expect people to test for failure of break and > continue, and bash even sets $? to 0 despite printing a warning. If this > error is so important as to need an error message I think should abort > the shell as well (via error(), so that "command break" will avoid > aborting). > > Furthermore note that bash disables these warnings in POSIX mode. [.....] I agree then, no error seems like the right thing to do. Thanks. -- Brian Somers Don't _EVER_ lose your sense of humour !