Re: pidfile_open incorrectly returns EAGAIN when pidfile is lock

看板FB_current作者時間12年前 (2013/04/27 14:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串14/14 (看更多)
--7J16OGEJ/mt06A90 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 14, 2013 at 08:28:25AM +0100, Dirk Engling wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On 13.03.13 23:08, Pawel Jakub Dawidek wrote: >=20 > > I think I considered something similar at first, but the change I=20 > > proposed was optimal, IMHO at the cost of producing pretty large > > diff, because of indentation change. But to be sure, can you send a > > patch of your proposed change? >=20 > http://erdgeist.org/arts/software/Code/pidfile.c.diff Right. Your patch assumes EWOULDBLOCK is equal to EAGAIN, which is true on FreeBSD, but is not portable. Also in case pidptr is NULL you compare errno three times instead of just one (not a big deal of course, just something that could be done a bit more optimal:)). --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --7J16OGEJ/mt06A90 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFBjeQACgkQForvXbEpPzTiUgCffVExSr5zUMsgST7+nXsv6Qzv 6agAmgNFGJPKCnZxbwEEdi3S8z3SUhho =5Sc5 -----END PGP SIGNATURE----- --7J16OGEJ/mt06A90--
文章代碼(AID): #1HUscVcH (FB_current)
討論串 (同標題文章)
完整討論串 (本文為第 14 之 14 篇):
文章代碼(AID): #1HUscVcH (FB_current)