From owner-freebsd-current@FreeBSD.ORG Thu Mar 14 20:19:30 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 1B953852; Thu, 14 Mar 2013 20:19:30 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id D3EBB943; Thu, 14 Mar 2013 20:19:29 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id E38A0A77; Thu, 14 Mar 2013 21:16:14 +0100 (CET) Date: Thu, 14 Mar 2013 21:21:02 +0100 From: Pawel Jakub Dawidek To: Chuck Swiger Subject: Re: pidfile_open incorrectly returns EAGAIN when pidfile is locked Message-ID: <20130314202101.GA1446@garage.freebsd.pl> References: <513F8D20.2050707@erdgeist.org> <201303140942.40945.jhb@freebsd.org> <20130314162958.GD1344@garage.freebsd.pl> <201303141250.59521.jhb@freebsd.org> <455D2A2E-97FE-42EF-A371-B7D7A9A0E14C@mac.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: <455D2A2E-97FE-42EF-A371-B7D7A9A0E14C@mac.com> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) 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:19:30 -0000 --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 14, 2013 at 10:11:07AM -0700, Chuck Swiger wrote: > Hi-- >=20 > On Mar 14, 2013, at 9:50 AM, John Baldwin wrote: > > On Thursday, March 14, 2013 12:29:58 pm Pawel Jakub Dawidek wrote: >=20 > [ ... ] > >> 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? > >=20 > > I'm sure the compiler can work that out just fine and it should do what= ever > > is most readable to the programmer. I don't care either way. >=20 > 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:) --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFCMS0ACgkQForvXbEpPzT25ACgzB7icyos1h0RnM56kRx7AGHI HuEAnij80bFynlzTeZycNPCKbLnYfNg7 =29eY -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM--