httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject APR questions/issues
Date Sun, 02 Jul 2000 09:18:20 GMT
I just ran into a sticking point on the DAV integration dealing with file
locks. How are locks-per-file done with APR? Specifically, if process A
opens file Foo, how do we get process B to block when it tries to open the
same file?

Both ap_lock_t and ap_file_t seem to assume that the lock/file object is
shared between the processes to accomplish the locking procedure. I'm
looking for two independent locks/files/whatever to be created and then to
interlock.

I've listed this in the STATUS file, but figured that I'd call it out here.
APR appears to missing one feature that DAV needs, and one that it would be
nice to have.

*) there does not seem to be a chmod() equivalent. the DAV code uses this to
   set executable flags on files in the repository (e.g. when somebody
   uploads a CGI script, they can then enable it for execution)

*) the DAV code optimizes a "move" on the same dev_t by just doing a rename.
   The ap_finfo_t structure exposes the inode, but not the dev_t. This is
   actually a bit weird, as the inode is specific to the device (in other
   words, why expose it when it isn't unique by itself). I would like to
   keep the optimization based on the dev_t. Any issues with exposing that
   in the finfo structure?


btw, the DAV code is closer to working, but that new lock code that I put
into SDBM gums it all up. The lock database gets opened, holds the lock, and
then we can't open any property databases (the lock is operating per-process
rather than per-file).

Cheers,
-g

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

Mime
View raw message