File: dotlock.html

package info (click to toggle)
maildrop 0.75-2.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,760 kB
  • ctags: 1,588
  • sloc: cpp: 9,269; ansic: 6,018; perl: 786; sh: 467; makefile: 398
file content (51 lines) | stat: -rw-r--r-- 2,234 bytes parent folder | download | duplicates (2)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!-- DSTART                                                                -->
<!--                                                                       -->
<!--           maildrop - mail delivery agent with filtering abilities     -->
<!--                                                                       -->
<!--  Copyright 1998-1999, Double Precision Inc.                           -->
<!--                                                                       -->
<!--  This program is distributed under the terms of the GNU General Publi -->
<!--  License. See COPYING for additional information.                     -->
<!-- DEND                                                                  -->
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; Linux 2.0.32 i586) [Netscape]">
   <TITLE>dotlock - create mail lock files</TITLE>
<!-- $Id: dotlock.html 1.1 1998/04/23 00:25:22 mrsam Exp $ -->
<!-- SECTION 1 -->
</HEAD>
<BODY>

<H1>
dotlock - create lock files</H1>

<BR><BR>
<H2>
SYNOPSIS</H2>
<TT>dotlock [-f] lock-file program [arg] [arg] ...</TT>
<BR><BR>
<H2>
DESCRIPTION</H2>
The <I>dotlock</I> program creates a lock file that's compatible with <I>maildrop</I>,
and other mail software, then runs a program. When the program terminates,
the lock file is removed.

<P>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. <I>dotlock</I> 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).

<P>Please note that you must specify the full name of the lock file, including
the ".lock" extension. Therefore, to lock <TT>/var/spool/mail/user</TT>,
you must specify <TT>/var/spool/mail/user.lock</TT> as the lock file. If
you omit the .lock extension, you'll end up deleting your mail!
<BR><BR>
<H2>
SEE ALSO</H2>
sendmail(8), <A HREF="maildrop.html">maildrop(1)</A>
</BODY>
</HTML>