README
1
2 README for liblockfile
3
4
5This library implements a number of functions found in -lmail on SysV
6systems. These functions are designed to lock the standard mailboxes in
7/var/mail (or wherever the system puts them).
8
9In additions, this library adds a number of functions to create,
10manage and remove generic lockfiles.
11
12The lockfiles are created by this library in an NFS-safe manner, that
13is by using a tempfile and using link(2) to create the lockfile. It
14works around several defects in NFS servers to make sure the lockfile
15is created atomically.
16
17The locking strategy is compatible with other well-written NFS-safe
18programs that create lockfiles - such as procmail, exim and mutt.
19
20If you are trying to lock a mailbox in a directory writable for group
21mail, the locking functions will call a helper application which runs
22setgid to do the actual locking. The helper application "dotlockfile"
23can also be used directly, for example for use in shellscripts.
24
25This means a program such as a MUA doesn't need to be setgid mail anymore
26to be able to lock the mailbox.
27
28See the included manualpages for more info:
29
30Function Manpage
31======== =======
32maillock,
33mailunlock,
34touchlock - maillock.3
35
36lockfile_create,
37lockfile_remove,
38lockfile_touch,
39lockfile_check - lockfile_create.3
40
41
42