From owner-freebsd-current@FreeBSD.ORG Mon Apr 1 19:56:20 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A1A4B81D; Mon, 1 Apr 2013 19:56:20 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) by mx1.freebsd.org (Postfix) with ESMTP id 6C1AAD4D; Mon, 1 Apr 2013 19:56:20 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id B17BE1203CC; Mon, 1 Apr 2013 21:56:04 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 82D3B2848C; Mon, 1 Apr 2013 21:56:01 +0200 (CEST) Date: Mon, 1 Apr 2013 21:56:01 +0200 From: Jilles Tjoelker To: John Baldwin Subject: Re: rc.subr: disabling globbing while processing devfs rules Message-ID: <20130401195601.GA47384@stack.nl> References: <514D6AC5.8010409@FreeBSD.org> <201304011406.50417.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201304011406.50417.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@freebsd.org, freebsd-rc@freebsd.org, Andriy Gapon X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 19:56:20 -0000 On Mon, Apr 01, 2013 at 02:06:50PM -0400, John Baldwin wrote: > Why not use 'local -' instead of the $- magic? That is: > devfs_rulesets_from_file() > { > local file _err _me - > > ... > set -f > ... > } > That would seem to be simpler. I had mentioned this possibility on IRC, but this feature is specific to Almquist-derived shells (ash) and so something more portable was selected. (It's still not standard because POSIX does not specify "local" but it works on most shells in use.) -- Jilles Tjoelker