On 8/17/2011 1:23 PM, Jason Funk wrote:
> I find that if I use seteuid() to the uid of the user that my server is
> running as before creating the mutex and back to root afterwards, then it
> works.  Is there anything wrong with this approach?

This only works if the target path is apache-user writable, /var/lock/
space typically is not.

ap_proc_mutex_create takes care of the ownership issues (note that
is -not- the same as apr_proc_mutex_create).

Take a look at httpd-2.3 beta for integrating your mutexes into
the new Mutex directive.  I've adapted the Mutex directive feature
as a 2.2 module here;

http://people.apache.org/~wrowe/httpd-2.2-ports/mod_mutex.c
http://people.apache.org/~wrowe/httpd-2.2-ports/util_mutex.h



Reply via email to