Commit 81f54b42 authored by Ralf S. Engelschall's avatar Ralf S. Engelschall
Browse files

First part to fix the synchronization-locking for RewriteMap programs under

Unix derivates who doesn't accept the locking of pipes directly.

But we perhaps have another problem: According to FreeBSD's manpage and a hint
by the submitter of PR#1029 flock() has to be used on opened filedescriptors
which are _not_ duplicated via fork().  This currently is not the case...

Submitted by: Ralf S. Engelschall
Reviewed by: Ralf S. Engelschall, Jim Jagielski


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@80311 13f79535-47bb-0310-9956-ffa450edef68
parent 17f158d2
Loading
Loading
Loading
Loading
+30 −0
Changes for docs/manual/mod/mod_rewrite.html: 30 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ gifted exclusively to the The Apache Group in July 1997 by
    <LI><A HREF="#RewriteOptions">RewriteOptions</A>
    <LI><A HREF="#RewriteLog">RewriteLog</A>
    <LI><A HREF="#RewriteLogLevel">RewriteLogLevel</A>
    <LI><A HREF="#RewriteLock">RewriteLock</A>
    <LI><A HREF="#RewriteMap">RewriteMap</A>
    <LI><A HREF="#RewriteBase">RewriteBase</A>
    <LI><A HREF="#RewriteCond">RewriteCond</A>
@@ -252,6 +253,32 @@ RewriteLogLevel 3
<hr noshade size=1>
<P>

<H3><A NAME="RewriteLock">RewriteLock</A></H3>
<A
 HREF="directive-dict.html#Syntax"
 REL="Help"
><STRONG>Syntax:</STRONG></A> <CODE>RewriteLock</CODE> <EM>Filename</EM><BR>
<A
 HREF="directive-dict.html#Default"
 REL="Help"
><STRONG>Default:</STRONG></A> -<EM>None</EM>-<BR>
<A
 HREF="directive-dict.html#Context"
 REL="Help"
><STRONG>Context:</STRONG></A> server config, virtual host<BR>
<P>

This directive sets the filename for a synchronization lockfile which
mod_rewrite needs to communicate with <SAMP>RewriteMap</SAMP>
<EM>programs</EM>. Set this lockfile to a local path (not on a NFS-mounted
device) when you want to use a rewriting map-program. It is not required for
SAMP
using all other types of rewriting maps.

<P>
<hr noshade size=1>
<P>

<H3><A NAME="RewriteMap">RewriteMap</A></H3>
<A
 HREF="directive-dict.html#Syntax"
@@ -439,6 +466,9 @@ while (&lt;STDIN&gt;) {
    <LI>Avoid one common mistake: never do buffered I/O on <TT>stdout</TT>!
        This will cause a deadloop! Hence the ``<TT>$|=1</TT>'' in the above
        example...
    <LI>Use the <SAMP>RewriteLock</SAMP> directive to define a lockfile
        mod_rewrite can use to synchronize the communication to the program.
        Per default no such synchronization takes place.
    </OL>
</UL>