Date: Thu, 14 Mar 2013 10:33:35 +0100 (CET) From: Dirk Engling <erdgeist@erdgeist.org> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: freebsd-current@freebsd.org Subject: Re: pidfile_open incorrectly returns EAGAIN when pidfile is locked Message-ID: <alpine.BSF.2.00.1303141020000.67262@erdgeist.org> In-Reply-To: <20130314084420.GH1372@garage.freebsd.pl> References: <513F8D20.2050707@erdgeist.org> <201303131118.36811.jhb@freebsd.org> <20130313212750.GC1372@garage.freebsd.pl> <alpine.BSF.2.00.1303132256540.67262@erdgeist.org> <20130313220831.GF1372@garage.freebsd.pl> <51417C19.9060002@erdgeist.org> <20130314084420.GH1372@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Mar 2013, Pawel Jakub Dawidek wrote: > 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:)). You're right. OTOH, wouldn't modifying pidfile_read to return EAGAIN and not EWOULDBLOCK totally be worth saving that 2 lines in the patch? ;) erdgeist
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1303141020000.67262>