<tr><th><a href="directive-dict.html#Module">Module:</a></th><td><code class="module"><a href="../mod/leader.html">leader</a></code>, <code class="module"><a href="../mod/perchild.html">perchild</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/threadpool.html">threadpool</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr>
</table>
<p>The <code class="directive">AcceptMutex</code> directives sets the
- method that Apache uses to serialize multiple children accepting
+ method (and lockfile location if appropriate) that Apache uses to
+ serialize multiple children accepting
requests on network sockets. Prior to Apache 2.0, the method was
selectable only at compile time. The optimal method to use is
highly architecture and platform dependent. For further details,
listing the available methods.</p>
<dl>
- <dt><code>flock</code></dt>
+ <dt><code>flock<<var>:/path/to/lockfile</var>></code></dt>
<dd>uses the <code>flock(2)</code> system call to lock the
- file defined by the <code class="directive"><a href="#lockfile">LockFile</a></code> directive.</dd>
+ file defined by the optional <var>/path/to/lockfile</var>
+ parameter. One can also use the <code class="directive"><a href="#lockfile">LockFile</a></code> directive to specify the lockfile,
+ although this is depreciated.</dd>
- <dt><code>fcntl</code></dt>
+ <dt><code>fcntl<<var>:/path/to/lockfile</var>></code></dt>
<dd>uses the <code>fcntl(2)</code> system call to lock the
- file defined by the <code class="directive"><a href="#lockfile">LockFile</a></code> directive.</dd>
+ file defined by the optional <var>/path/to/lockfile</var>
+ parameter. One can also use the <code class="directive"><a href="#lockfile">LockFile</a></code> directive to specify the lockfile,
+ although this is depreciated.</dd>
+
+ <dt><code>file<<var>:/path/to/lockfile</var>></code></dt>
+ <dd>This directive tells Apache to pick the "best" file locking
+ implementation available to it, choosing between <code>fcntl</code> and
+ <code>flock</code>, in that order. It is only available when the underlying
+ platform and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> supports at least one of the 2.</dd>
<dt><code>posixsem</code></dt>
<dd>uses POSIX compatible semaphores to implement the mutex.</dd>
+ <dt><code>sysvsem</code></dt>
+ <dd>uses SySV-style semaphores to implement the mutex.</dd>
+
+ <dt><code>sem</code></dt>
+ <dd>This directive tells Apache to pick the "best" semaphore
+ implementation available to it, choosing between Posix and SystemV IPC,
+ in that order. It is only available when the underlying platform and
+ <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> supports at least one of the 2.</dd>
+
<dt><code>pthread</code></dt>
<dd>uses POSIX mutexes as implemented by the POSIX Threads
(PThreads) specification.</dd>
- <dt><code>sysvsem</code></dt>
- <dd>uses SySV-style semaphores to implement the mutex.</dd>
</dl>
<p>If you want to find out the compile time chosen default
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LockFile" id="LockFile">LockFile</a> <a name="lockfile" id="lockfile">Directive</a></h2>
<table class="directive">
-<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location of the accept serialization lock file</td></tr>
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location of the accept serialization lock file <em>(depreciated)</em></td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LockFile <var>filename</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LockFile logs/accept.lock</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
creating a lockfile with the same name as the one the server will try
to create.</p>
</div>
+ <div class="warning"><h3>Depreciated</h3>
+ <p>This directive is depreciated. It is strongly suggested that
+ you use <code class="directive"><a href="#acceptmutex">AcceptMutex</a></code> to
+ specify both the mutex locking implementation as well as
+ the lockfile location.</p>
+ </div>
+
<h3>See also</h3>
<ul>
listing the available methods.</p>
<dl>
- <dt><code>flock<<i>:/path/to/lockfile</i>></code></dt>
+ <dt><code>flock<<var>:/path/to/lockfile</var>></code></dt>
<dd>uses the <code>flock(2)</code> system call to lock the
- file defined by the optional <i>/path/to/lockfile</i>
+ file defined by the optional <var>/path/to/lockfile</var>
parameter. One can also use the <directive module="mpm_common"
>LockFile</directive> directive to specify the lockfile,
although this is depreciated.</dd>
- <dt><code>fcntl<<i>:/path/to/lockfile</i>></code></dt>
+ <dt><code>fcntl<<var>:/path/to/lockfile</var>></code></dt>
<dd>uses the <code>fcntl(2)</code> system call to lock the
- file defined by the optional <i>/path/to/lockfile</i>
+ file defined by the optional <var>/path/to/lockfile</var>
parameter. One can also use the <directive module="mpm_common"
>LockFile</directive> directive to specify the lockfile,
although this is depreciated.</dd>
- <dt><code>file<<i>:/path/to/lockfile</i>></code></dt>
+ <dt><code>file<<var>:/path/to/lockfile</var>></code></dt>
<dd>This directive tells Apache to pick the "best" file locking
implementation available to it, choosing between <code>fcntl</code> and
<code>flock</code>, in that order. It is only available when the underlying
<directivesynopsis>
<name>LockFile</name>
-<description>Location of the accept serialization lock file <b>(depreciated)</b></description>
+<description>Location of the accept serialization lock file <em>(depreciated)</em></description>
<syntax>LockFile <var>filename</var></syntax>
<default>LockFile logs/accept.lock</default>
<contextlist><context>server config</context></contextlist>