[Date Prev][Date Next] [Chronological] [Thread] [Top]

locking slapd replog


I'm working on a small program that needs to interact with the slapd
replog in a similar way to slurpd (except that it does something
different once it gets the data).  The man page for slapd.replog states
that access is synchronized through the use of flock(3) on a second file,
slapd.replog.lock, rather than locking the primary file slapd.replog.

However, when I took a look at the code, it seems as if slapd prefers to
use lockf or fcntl over flock if they are available.  Is mixing these
three between different processes portable?  Or is the man page out of date?

Also, in the interests of my education, does anyone know why the lock is
applied to this other .lock file rather than just locking the primary