From owner-freebsd-arch@FreeBSD.ORG Mon Dec 15 15:16:51 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C8BE16A4CE for ; Mon, 15 Dec 2003 15:16:51 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6784143D41 for ; Mon, 15 Dec 2003 15:16:49 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id hBFNGmHe044627; Mon, 15 Dec 2003 17:16:48 -0600 (CST) (envelope-from dan) Date: Mon, 15 Dec 2003 17:16:48 -0600 From: Dan Nelson To: Bruce M Simpson Message-ID: <20031215231648.GH17799@dan.emsphone.com> References: <20031213130351.N59162@root.org> <20031215220627.GB16497@saboteur.dek.spc.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031215220627.GB16497@saboteur.dek.spc.org> X-OS: FreeBSD 5.2-BETA X-message-flag: Outlook Error User-Agent: Mutt/1.5.5.1i cc: arch@freebsd.org cc: acpi-jp@jp.freebsd.org cc: Nate Lawson Subject: Re: Power profile script X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2003 23:16:51 -0000 In the last episode (Dec 15), Bruce M Simpson said: > On Sat, Dec 13, 2003 at 01:12:03PM -0800, Nate Lawson wrote: > > I'm mostly looking for style input on the /etc/power_profile script since > > I'm not familiar with our scripting guidelines. Note that it's called > > from devd (or manually by the user) and is not an rc.d boot-time thing. > > One of the things green suggested to me when I was airing out the new > trafd.sh rcNG script was the use of $(...) instead of the backtick > operator -- apparently this has slightly different semantics but it > does save on forking overhead. It shouldn't have any difference wrt overhead; `` and $() end up doing just about the same thing in src/bin/sh/parser.c; see the code starting at parsebackq. oldstyle is 1 when processing the `` style. They both fork under the same conditions. I use the $() syntax mainly because it's easier to nest. -- Dan Nelson dnelson@allantgroup.com