1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
.TH dotlock 1 "January 3, 2000" "Double Precision, Inc." ""
.\" $Id: dotlock.html 1.1 1998/04/23 00:25:22 mrsam Exp $
.SH NAME
dotlock \- create lock files
.br
.br
.SH "SYNOPSIS
dotlock [-f] lock-file program [arg] [arg] ...
.br
.br
.SH "DESCRIPTION
The \fIdotlock\fP program creates a lock file that's compatible with \fImaildrop\fP,
and other mail software, then runs a program. When the program terminates,
the lock file is removed.
.PP
Because a mailbox file can only be accessed by one program at a time,
a lock file must be used by all programs who need to use the mailbox file.
Otherwise, while one program uses a mailbox file, another program can write
to it, resulting a corrupted mailbox. \fIdotlock\fP creates a dot-lock file
by default. Specifying the -f option will create an flock lock instead
(the file is opened, and the flock() system call is used to obtain a lock
on the file).
.PP
Please note that you must specify the full name of the lock file, including
the ".lock" extension. Therefore, to lock /var/spool/mail/user,
you must specify /var/spool/mail/user.lock as the lock file. If
you omit the .lock extension, you'll end up deleting your mail!
.br
.br
.SH "SEE ALSO
sendmail(8), maildrop(1)
|