apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: cvs commit: apr STATUS
Date Wed, 26 Dec 2001 00:56:43 GMT
On Fri, Dec 21, 2001 at 07:57:38AM -0500, Jeff Trawick wrote:
> jerenkrantz@apache.org writes:
> 
> > jerenkrantz    01/12/12 02:05:54
> > 
> >   Modified:    .        STATUS
> >   Log:
> >   Not a big deal, but worth noting.  If anyone has an idea on how to
> >   detect this, it'd be general goodness to error out when we create
> >   the lock rather than waiting to error out when acquiring the lock.
> >   
> >   +    * FreeBSD returns 45 (EOPNOTSUPP) when the lockfile is on a NFS
> >   +      partition when you call fcntl(F_SETLKW).  It may be good if we 
> >   +      can somehow detect this and error out when creating the lock
> >   +      rather than waiting for the error to occur when acquiring lock.
> 
> Other platforms return something different :(
> 
> Maybe we should try to acquire/release the lock during create time,
> and return the acquire errno if that fails.  Maybe the error codes
> differ between systems but at least we fail ahead of time.
> 
> That sounds easy and harmless to me.  Any improvements to this?

I'd like to see this as a lock creation option.  Something like
a flag - say, APR_LOCK_VERIFY or some such.  I don't think we should
do the acquire/release unless asked for by the caller.  I think
this might mean changing or extending the lock creation APIs -
thoughts?  -- justin


Mime
View raw message