From owner-freebsd-current@FreeBSD.ORG Thu Mar 14 20:35:42 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 07F072FD; Thu, 14 Mar 2013 20:35:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D3FE8A12; Thu, 14 Mar 2013 20:35:41 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 43BB7B94C; Thu, 14 Mar 2013 16:35:41 -0400 (EDT) From: John Baldwin To: Pawel Jakub Dawidek Subject: Re: pidfile_open incorrectly returns EAGAIN when pidfile is locked Date: Thu, 14 Mar 2013 16:34:28 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <513F8D20.2050707@erdgeist.org> <455D2A2E-97FE-42EF-A371-B7D7A9A0E14C@mac.com> <20130314202101.GA1446@garage.freebsd.pl> In-Reply-To: <20130314202101.GA1446@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201303141634.28269.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 14 Mar 2013 16:35:41 -0400 (EDT) Cc: freebsd-current Current 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: Thu, 14 Mar 2013 20:35:42 -0000 On Thursday, March 14, 2013 4:21:02 pm Pawel Jakub Dawidek wrote: > On Thu, Mar 14, 2013 at 10:11:07AM -0700, Chuck Swiger wrote: > > Hi-- > > > > On Mar 14, 2013, at 9:50 AM, John Baldwin wrote: > > > On Thursday, March 14, 2013 12:29:58 pm Pawel Jakub Dawidek wrote: > > > > [ ... ] > > >> Heh, I did consider that as well, but here you check errno twice, > > >> instead of once. Guys, is there anything wrong with the patch I > > >> proposed? > > > > > > I'm sure the compiler can work that out just fine and it should do whatever > > > is most readable to the programmer. I don't care either way. > > > > Strong +1. Having the code be correct and readable is much more important > > then trying to hand-optimize a single-digit # of integer compares in > > startup code that usually runs ~once per process. > > Well, I think my version is more obvious, just the diff is larger. > Anyway, I think enough has been said already about this crucial change:) Yours is fine, commit it already. -- John Baldwin