From owner-cvs-all@FreeBSD.ORG Wed Jul 26 05:27:54 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96B9616A4DD for ; Wed, 26 Jul 2006 05:27:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx24.fluidhosting.com [204.14.89.7]) by mx1.FreeBSD.org (Postfix) with SMTP id B224D43D55 for ; Wed, 26 Jul 2006 05:27:53 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 31562 invoked by uid 399); 26 Jul 2006 05:27:51 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 26 Jul 2006 05:27:51 -0000 Message-ID: <44C6FD55.7040204@FreeBSD.org> Date: Tue, 25 Jul 2006 22:27:49 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.4 (X11/20060604) MIME-Version: 1.0 To: Yar Tikhiy References: <200607251720.k6PHKMau082559@repoman.freebsd.org> In-Reply-To: <200607251720.k6PHKMau082559@repoman.freebsd.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc rc.subr X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2006 05:27:54 -0000 Yar Tikhiy wrote: > yar 2006-07-25 17:20:22 UTC > > FreeBSD src repository > > Modified files: > etc rc.subr > Log: > Avoid extra runs of test(1) by using its built-in logical operations. > > Revision Changes Path > 1.63 +9 -15 src/etc/rc.subr > > http://www.FreeBSD.org/cgi/cvsweb.cgi/src/etc/rc.subr.diff?&r1=1.62&r2=1.63&f=h I'm pretty sure that this commit has the opposite effect from what you intended. If you do: [ foo -a bar ] then the bar test will always be run, whereas if you do [ foo ] && [ bar ] bar won't run unless foo succeeds. Also, you should be aware that in our /bin/sh test is a builtin, so what you're trying to optimize for is not actually an issue to start with. Unless you can show that this commit actually does improve performance, I'd appreciate it if you'd reverse it. Doug -- This .signature sanitized for your protection