Date: Wed, 13 Mar 2013 22:59:17 +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.1303132256540.67262@erdgeist.org> In-Reply-To: <20130313212750.GC1372@garage.freebsd.pl> References: <513F8D20.2050707@erdgeist.org> <201303131118.36811.jhb@freebsd.org> <20130313212750.GC1372@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 13 Mar 2013, Pawel Jakub Dawidek wrote: > How about this patch? > > http://people.freebsd.org/~pjd/patches/pidfile.c.patch If you move the lines + if (errno == 0 || errno == EAGAIN) + errno = EEXIST; out of the else branch, you can get rid of the if branch, guard the else branch by a + if (pidptr) { and let the if (errno == 0 || errno == EAGAIN) fix the errno Regards, erdgeist
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1303132256540.67262>