Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Dec 2003 17:16:48 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Bruce M Simpson <bms@spc.org>
Cc:        Nate Lawson <nate@root.org>
Subject:   Re: Power profile script
Message-ID:  <20031215231648.GH17799@dan.emsphone.com>
In-Reply-To: <20031215220627.GB16497@saboteur.dek.spc.org>
References:  <20031213130351.N59162@root.org> <20031215220627.GB16497@saboteur.dek.spc.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031215231648.GH17799>