This file is indexed.

/usr/share/doc/mhonarc/resources/lockmethod.html is in mhonarc 2.6.19-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<html>
<head>
<title>MHonArc Resources: LOCKMETHOD</title>
<link rel="stylesheet" type="text/css" href="../docstyles.css">
</head>
<body>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="lockfile.html">LOCKFILE</a>]</td><td><nobr>[<a href="../resources.html#lockmethod">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="locktries.html">LOCKTRIES</a>]</td></tr></table>
<!--/x-rc-nav-->
<hr>
<h1>LOCKMETHOD</h1>
<!--X-TOC-Start-->
<ul>
<li><a href="#syntax">Syntax</a>
<li><a href="#description">Description</a>
<ul>
<li><small><a href="#">Directory File Method</a></small>
<li><small><a href="#">flock Method</a></small>
</ul>
<li><a href="#default">Default Setting</a>
<li><a href="#rcvars">Resource Variables</a>
<li><a href="#examples">Examples</a>
<li><a href="#version">Version</a>
<li><a href="#seealso">See Also</a>
</ul>
<!--X-TOC-End-->

<!-- *************************************************************** -->
<hr>
<h2><a name="syntax">Syntax</a></h2>

<dl>

<dt><strong>Envariable</strong></dt>
<dd><p>
<code>M2H_LOCKMETHOD=</code><var>method</var>
</p>
</dd>

<dt><strong>Element</strong></dt>
<dd><p>
<code>&lt;LOCKMETHOD&gt;</code><br>
<var>method</var><br>
<code>&lt;/LOCKMETHOD&gt;</code><br>
</p>
</dd>

<dt><strong>Command-line Option</strong></dt>
<dd><p>
<code>-lockmethod </code><var>method</var>
</p>
</dd>

</dl>

<!-- *************************************************************** -->
<hr>
<h2><a name="description">Description</a></h2>

<p>LOCKMETHOD determines how MHonArc should lock archives to protect
multiple MHonArc processes modifying an archive at the same time.  If
after reading this page you still are unsure on what method to use, or
do not understand some of the material, then just stick with the default
value.
</p>

<p>The following is a list of possible values for LOCKMETHOD:
</p>
<dl>

<dt><tt>directory</tt></dt>
<dd><p>MHonArc uses a directory file in the archive directory to
lock an archive.  When MHonArc is to access/modify an archive, it
will first try to create a directory in the archive directory
with a name determined by the
<a href="lockfile.html">LOCKFILE</a> resource.  MHonArc will try
<a href="locktries.html">LOCKTRIES</a> times to create
the directory (obtains the lock) before timing out.
</p>
</dd>

<dt><tt>flock</tt></dt>
<dd><p>MHonArc will use Perl's <b>flock()</b> operator.
<a href="lockfile.html">LOCKFILE</a> will be created in the archive
directory if does not already exist.  Then MHonArc will try to
<a href="locktries.html">LOCKTRIES</a> times to obtain
an exclusive lock on the file via flock() before timing out.
</p>
</dd>

</dl>

<table border=0 cellpadding=4>
<tr valign=top>
<td><strong><font color="red">WARNING</font></strong></td>
<td><p>Each locking method is incompatible with each other.  Therefore,
make sure the same method is specified for all MHonArc processes that
will be accessing a given archive.
If you want to change the default
lock method so it will affect all MHonArc processes, you can set
it via the default resource file or through <b><tt>mhasiteinit.pl</tt></b>.
See
<a href="../install.html#postinstall">Post Installation Configuration</a>
for more information.
</p>
</td>
</tr>
</table>

<p>The following sub-sections give more information of each lock method,
including the pros and cons of each,
and assumes you have some knowledge about file systems.
</p>

<h3>Directory File Method</h3>
<p>The directory file method is the default method used by MHonArc,
and is the method used by past version of MHonArc.  If you are familiar
with locking methods used by other software, you may find it strange
that a directory (which is just a special kind of file) is used instead
of a plain file.  The reason a directory is used is that it has
unique properties over regular files on the various operating systems
MHonArc runs on.  The property that MHonArc takes advantage of is
that you cannot create a new directory over an existing directory of
the same name.  This property is not guaranteed for plain files, or
at least Perl cannot give a common interface for plain files to work
on all platforms.  It may be possible to use a plain file with
Perl's <b>sysopen()</b> operator with the proper options, but
the needed sysopen() options are not guaranteed to be available
for all ports of Perl.
</p>

<h4>Pros</h4>
<ul>
<li><p>Appears to work for all known platforms.
</p>
</li>
</ul>
<h4>Cons</h4>
<ul>
<li><p>If MHonArc/Perl abnormally terminates, MHonArc may not have the
chance to delete the directory, failing to release the lock on the archive
(a stale lock).
This will cause other MHonArc processes to fail out with "Unable to lock ..."
messages.  To correct, manual deletion of the directory is required
(or <a href="force.html">FORCE</a> must be used).
</p>
</li>
</ul>

<h3>flock Method</h3>
<p>Using flock() is a common method for locking files under Unix-type
operating systems.  In order to use flock() method, the <b>Symbol</b>
and <b>Fcntl</b> Perl modules must be available.  If not available, and
this method is specified, MHonArc will fallback to the directory file
method.
</p>
<p>Unlike the directory method, it is okay if
<a href="lockfile.html">LOCKFILE</a> stays around, and actually, it
should never be manual deleted.
</p>

<h4>Pros</h4>
<ul>
<li><p>Lock is automatically released if MHonArc/Perl abnormally terminates,
eliminating the stale lock problem.
</p>
</li>
</ul>
<h4>Cons</h4>
<ul>
<li><p>Not availabe on all platforms.
</p>
</li>
<li><p>May not work over NFS reliably.  Read the documentation
for flock() in the Perl documentation for more information.
</p>
</ul>

<!-- *************************************************************** -->
<hr>
<h2><a name="default">Default Setting</a></h2>

<p><tt>directory</tt>
</p>
<table border=0 cellpadding=4>
<tr valign=top>
<td><strong>NOTE</strong></td>
<td><p>The use of &lt;LOCKMETHOD&gt; within an
<a href="rcfile.html">RCFILE</a> will take affect <b>ONLY</b> if used in the
<a href="defrcfile.html">DEFRCFILE</a>.
</p>
</td>
</tr>
</table>
<table border=0 cellpadding=4>
<tr valign=top>
<td><strong><font color="red">WARNING</font></strong></td>
<td><p>Each locking method is incompatible with each other.  Therefore,
make sure the same method is specified for all MHonArc processes that
will be accessing a given archive.
If you want to change the default
lock method so it will affect all MHonArc processes, you can set
it via the default resource file or through <b><tt>mhasiteinit.pl</tt></b>.
See
<a href="../install.html#postinstall">Post Installation Configuration</a>
for more information.
</p>
</td>
</tr>
</table>


<!-- *************************************************************** -->
<hr>
<h2><a name="rcvars">Resource Variables</a></h2>

<p>N/A
</p>

<!-- *************************************************************** -->
<hr>
<h2><a name="examples">Examples</a></h2>

<p>None.
</p>

<!-- *************************************************************** -->
<hr>
<h2><a name="version">Version</a></h2>

<p>2.4.0
</p>

<!-- *************************************************************** -->
<hr>
<h2><a name="seealso">See Also</a></h2>

<p>
<a href="force.html">FORCE</a>,
<a href="lock.html">LOCK</a>,
<a href="lockdelay.html">LOCKDELAY</a>,
<a href="lockfile.html">LOCKFILE</a>,
<a href="locktries.html">LOCKTRIES</a>
</p>

<!-- *************************************************************** -->
<hr>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="lockfile.html">LOCKFILE</a>]</td><td><nobr>[<a href="../resources.html#lockmethod">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="locktries.html">LOCKTRIES</a>]</td></tr></table>
<!--/x-rc-nav-->
<hr>
<address>
$Date: 2003/10/06 22:04:18 $ <br>
<img align="top" src="../monicon.png" alt="">
<a href="http://www.mhonarc.org/"
><strong>MHonArc</strong></a><br>
Copyright &#169; 1999, <a href="http://www.earlhood.com/"
>Earl Hood</a>, <a href="mailto:mhonarc&#37;40mhonarc.org"
>mhonarc<!--
-->&#64;<!--
-->mhonarc.org</a><br>
</address>

</body>
</html>