apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: APR_EXCL
Date Sat, 20 Jan 2001 02:59:52 GMT
On Fri, Jan 19, 2001 at 08:47:28PM -0600, William A. Rowe, Jr. wrote:
> > From: Greg Stein [mailto:gstein@lyra.org]
> > Sent: Friday, January 19, 2001 8:38 PM
> > 
> > On Fri, Jan 19, 2001 at 08:15:44PM -0600, William A. Rowe, Jr. wrote:
> > > 
> > > Why do we insist on being apache?  Docs for APR_EXCL flag
> > > state "Open should fail if APR_CREATE and file exists"
> > > 
> > > That's great for a web server.  Why in APR?
> > 
> > Euh... what are you talking about? This is a standard flag. 
> > Look up O_EXCL in the open() man/doc pages.
> 
> This is the win32 apr_open code...
> 
> if ((flag & APR_EXCL) && !(flag & APR_CREATE)) {
>     return APR_EACCES;
> }
> 
> That's not what I get out of the man pages.  What is the side
> effect of O_EXCL and !O_CREATE?  I'm not clear.

O_EXCL is only useful when O_CREAT is used. Otherwise, O_EXCL can be
ignored. (see _O_EXCL in your MSDN library)

The above test is probably redundant (read: remove it), since it shouldn't
ever happen. (and our policy is to not worry about caller mistakes)

But APR_EXCL and APR_CREATE should remain.

Cheers,
-g

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

Mime
View raw message