apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apr STATUS
Date Thu, 14 Dec 2000 19:56:46 GMT
On Thu, Dec 14, 2000 at 09:48:56AM -0500, Jeff Trawick wrote:
> gstein@locus.apache.org writes:
> 
> > gstein      00/12/14 03:10:26
> > 
> >   Modified:    .        STATUS
> >   +    * apr_create_lock() changes:
> ...
> >   +      - The fname param is allowed to be NULL on the Unix platform.
> 
> feature, not bug...  Do you mean that the semantics associated with
> this ("make up a file for me if you need to, APR") are not implemented
> across all platforms?

Correct -- all the other platforms require the parameter.

> Do you disagree with the usefulness of that feature?

Not at all. However, I'd rather see *no* parameter, and the code just always
builds its own filename; or I'd rather see the parameter *always* required
(because if it can't properly construct the file for some reason, then we
better always give it the right one).

IOW, if the function knows how to create a filename that will work for the
lock (e.g. avoid NFS issues), then why the heck should we pass a value? If
it *doesn't* know enough, then we better always pass it, or some goofball
that doesn't pass the value is going to get screwed in some edge case.

> >   +        Change it to always use the passed value, and check
> >   callers.
> 
> It uses the passed value when appropriate, right?  Note that we don't
> always need a file as not all supported lock mechanisms are
> file-based.

It uses it when passed, but see above.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message