|
NAMEdotlockfile - Utility to manage lockfilesSYNOPSISdotlockfile -l [-r retries] [-i interval] [-p] [-q] <-m | lockfile>dotlockfile -l [-r retries] [-i interval] [-p] [-q] <-m | lockfile> [-P] cmd args ... dotlockfile -u | -t DESCRIPTIONdotlockfile is a command line utility to reliably create, test and remove lockfiles. It creates lockfiles reliably on local and NFS filesystems, because the crucial steps of testing for a preexisting lockfile and creating it are performed atomically by a single call to link(2). Manpage lockfile_create(3) describes the used algorithm.dotlockfile is installed with attribute SETGID mail and thus can also be used to lock and unlock mailboxes even if the mailspool directory is only writable by group mail. The name dotlockfile comes from the way mailboxes are locked for updates on a lot of UNIX systems. A lockfile is created with the same filename as the mailbox but with the string ".lock" appended. The names dotlock and lockfile were already taken – hence the name dotlockfile :). OPTIONS
RETURN VALUEZero on success, and non-zero on failure. When locking (the default, or with the -l option) dotlockfile returns the same values as the library function lockfile_create(3). Unlocking a non-existent lockfile is not an error.Unless the -P option was supplied, when a command is executed, the return value does not correspond with that of the command that was run. If locking and unlocking was successful, the exit status is zero. NOTESThe lockfile is created exactly as named on the command line. The extension ".lock" is not automatically appended.This utility is a lot like the lockfile(1) utility included with procmail, and the mutt_dotlock(1) utility included with mutt. However the command-line arguments differ, and so does the return status. It is believed, that dotlockfile is the most flexible implementation, since it automatically detects when it needs to use privileges to lock a mailbox, and does it safely. The above mentioned lockfile_create(3) manpage is present in the liblockfile-dev package. BUGSNone known.SEE ALSOlockfile_create(3), maillock(3)AUTHORMiquel van Smoorenburg
Visit the GSP FreeBSD Man Page Interface. |