Copyright (C) 2000-2012 |
Manpages lockfile-progsSection: Lockfile programs (1)Updated: 23 April 2001 Index Return to Main Contents NAMElockfile-progs - command-line programs to safely lock and unlock files and mailboxes (via liblockfile).SYNOPSISmail-lock [ --retry retry-count ]mail-unlock mail-touchlock [ --oneshot ]
lockfile-create
[
--retry
retry-count
]
filename
DESCRIPTIONlockfile-progs provide a method to lock and unlock mailboxes and files safely (via liblockfile).
mail-lock:
lock the current user's mailbox.
Each of the mail locking commands is applied to the file /var/spool/mail/<user>, if possible, where <user> is the name of the current user (determined from the effective uid via geteuid(2)).
lockfile-create:
lock a given file.
Once a file is locked, the lock must be touched at least once every five minutes, or it will be considered stale and a subsequent attempt to lock the file will succeed. For both of the locking commands (mail-touchlock and lockfile-touch), the --oneshot argument causes the program to touch the lock and exit immediately. Otherwise the program will loop forever, touching the lock once every minute until it is killed. For both of the locking commands (mail-lock and lockfile-create), the --retry argument specifies (as an integer) the maximum number of times to retry locking the file before giving up if attempts are failing. Each retry will be delayed a little longer than the last (in 5 second increments) until a maximum delay of one minute between retries is reached. The default retry count is 9 which, if all 9 attempts to lock the file fail, will give up after 180 seconds (3 minutes).
EXAMPLESLocking a file during a lengthy process:
EXIT STATUS
SEE ALSOmaillock(3), touchlock(3), mailunlock(3), lockfile-create(1), lockfile-remove(1), lockfile-touch(1), lockfile_create(3), lockfile_remove(3), lockfile_touch(3).HISTORY1998 - Written by Rob Browning <rlb@defaultvalue.org>.
IndexThis document was created by man2html, using the manual pages. Time: 22:27:01 GMT, November 13, 2024 |