[NBLUG/talk] mod_dav on multiple boxes?

Eric Eisenhart ee at eric.eisenhart.name
Tue Nov 16 11:11:58 PST 2004


On Tue, Nov 16, 2004 at 09:59:20AM -0800, Augie Schwer wrote:
> So if mod_dav uses flock, then I am boned it seems.

Not necessarily.

untar the source of httpd 2 someplace.

Under there look in modules/dav/fs -- there's a bunch of "lock" related
stuff, but no flocks *or* fcntls; not even an apr_file_lock.   Lots of
apr_dbm_* stuff.

Now look in srclib/apr-util/dbm -- This is where all the apr_dbm_* stuff is
from.  Again, no flocks, no fcntl calls and no apr_file_lock calls, though
some of the dbm modules use symbols from fcntl.h, they don't actually call
fcntl at any point.  Looking in more detail at apr_dbm_berkeleydb.c (the
actual module in use in my apaches), you can see where it makes the apr
"database modes" into the proper Berkeley DB modes (ro, r/w, etc.) via
constants from fcntl.h.  I'm pretty sure that BerkeleyDB uses fcntl under
the hood.  You could always open up the glibc stuff, look in the code and
find out.

If you're not sure you can trust the source code, you could always run
"strace -f httpd -X &> somefile", connect to that httpd, run some DAV things
(especially a lock and unlock) and look in "somefile" for flock and fcntl to
see what underlying calls are being used.
-- 
Eric Eisenhart <*@eric.eisenhart.name>
http://eric.eisenhart.name/
IRC: Freiheit at freenode, AIM: falsch freiheit, ICQ: 48217244




More information about the talk mailing list