apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@rkbloom.net>
Subject Re: Proc mutex re-org
Date Tue, 15 Jun 2004 12:49:24 GMT


On Tue, 15 Jun 2004, Joe Orton wrote:

> On Mon, Jun 14, 2004 at 08:02:41AM -0400, rbb@rkbloom.net wrote:
> > On Mon, 14 Jun 2004, Justin Erenkrantz wrote:
> > > How will fcntl() work with this?  flock() isn't on a bunch of platforms, so
> > > fcntl() is probably the more portable solution.
> > >
> > > For fcntl(), we open it for exclusive read and then unlink it right away -
how
> > > do you plan on dealing with that?  -- justin
>
> Good point.
>
> > Read the patch and find out.   :-)  FCNTL is tested in the test program,
> > and it _does_ work, but only as a fork() mutex.  flock was the one I
> > chose, just because I needed one that would work as a proc_exec mutex,
> > and fcntl doesn't.
>
> So to be clear, the answer to Justin's question is that your patch
> *doesn't* deal with this, and that APR_LOCK_PROC_CREATE_DEFAULT will be
> ENOTIMPL on e.g. Solaris and HP-UX?

If we don't want platforms using posix semaphores by default, then yes,
which is exceedingly ugly, and can be fixed easily in 1.1 by not deleting
the file as soon as it is created, and instead opening the file and
deleting it in a pool cleanup.

Ryan


Mime
View raw message