Date: Thu, 7 Aug 1997 08:30:01 -0700 (PDT) From: Marc Slemko <marcs@znep.com> To: freebsd-bugs Subject: Re: kern/4243: file locking doesn't work for pipe Message-ID: <199708071530.IAA12763@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/4243; it has been noted by GNATS.
From: Marc Slemko <marcs@znep.com>
To: David Greenman <dg@root.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/4243: file locking doesn't work for pipe
Date: Thu, 7 Aug 1997 05:22:34 -0600 (MDT)
On Thu, 7 Aug 1997, David Greenman wrote:
> Hmmm. Maybe I'm missing something obvious, but I can't think of a reason
> why one would want to do file locking on a pipe (which is not a shared
> resource). This sounds like a bug in Apache to me...
The specific reason why it is done in this case is as follows:
- it is possible to use a program to rewrite URLs using
mod_rewrite in Apache.
- when that is done, the implementation creates one process
to do the rewrite before the child processes are forked.
Each child has access to the input and output descriptors
of the one process.
- when a child wants to use the program for a rewrite map,
it has to be sure it has exclusive access.
There are a lot of ways to solve the above problem and many other
ways to implement a solution. This particular one locks the
descriptor to ensure only one child accesses the program at a time.
--
Marc Slemko | Apache team member
marcs@znep.com | marc@apache.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708071530.IAA12763>
