You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by "Graham Dumpleton (JIRA)" <ji...@apache.org> on 2006/03/11 05:49:40 UTC
[jira] Commented: (MODPYTHON-131) Make name of mutex directory
configurable.
[ http://issues.apache.org/jira/browse/MODPYTHON-131?page=comments#action_12369959 ]
Graham Dumpleton commented on MODPYTHON-131:
--------------------------------------------
In respect of:
http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/include/mod_python.h.in?rev=385000&r1=384999&r2=385000&view=diff
I think you probably want:
/* MUTEX_DIR can be set as a configure option
* ./configure --with-mutex-dir=/path/to/dir
*/
#define MUTEX_DIR "@MUTEX_DIR@"
Ie., quote value of macro.
And in:
http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/mod_python.c?rev=385000&r1=384999&r2=385000&view=diff
you probably want:
snprintf(fname, 255, "%s/mpmtx%d%d", MUTEX_DIR, glb->parent_pid, n);
Ie., MUTEX_DIR is substituted using %s, as macro will not be expanded in string.
Not sure why tests still pass with the way it was.
> Make name of mutex directory configurable.
> ------------------------------------------
>
> Key: MODPYTHON-131
> URL: http://issues.apache.org/jira/browse/MODPYTHON-131
> Project: mod_python
> Type: Improvement
> Components: core
> Versions: 3.2.7
> Reporter: Graham Dumpleton
> Assignee: Jim Gallacher
>
> Creating an issue for this so it can be tracked.
> Been pointed out in:
> http://www.mail-archive.com/python-dev@httpd.apache.org/msg01271.html
> that on Mandriva Linux, that is is necessary to manually change the mutex directory in mod_python.c source code. Area of code is:
> #if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
> char fname[255];
> snprintf(fname, 255, "/tmp/mpmtx%d%d", glb->parent_pid, n);
> #else
> char *fname = NULL;
> #endif
> There should be an option to configure program to allow this to be more easily changed.
> Way of changing the value through Apache configuration to also be investigated further.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Commented: (MODPYTHON-131) Make name of mutex directory
configurable.
Posted by Jim Gallacher <jp...@jgassociates.ca>.
Graham Dumpleton wrote:
>
>> This bit is going to change anyway when I add the PythonOption
>> mod_python.mutex_directory support. I have the changes ready, but I
>> think I'll review them in the morning rather than committing now.
>>
>> I decide to do this stuff in 2 steps:
>> 1. configure option
>> 2. PythonOption mod_python.mutex_directory
>> PythonOption mod_python.mutex_locks
>
>
> BTW, the commit seemed to miss newly generated src/include/mod_python.h and
> any notes added to Doc/appendixc.tex.
Not so much the commit as the committer. :)
I was going to update appendixc.tex when this thing is feature complete.
I didn't think to commit mod_python.h as it is generated from
mod_python.h.in by ./configure. I'll have to remember to commit it in
the future so that Nicolas doesn't have to edit it by hand. Life without
autoconf -- how sad. ;)
Jim
Re: [jira] Commented: (MODPYTHON-131) Make name of mutex directory configurable.
Posted by Graham Dumpleton <gr...@dscpl.com.au>.
> This bit is going to change anyway when I add the PythonOption
> mod_python.mutex_directory support. I have the changes ready, but I
> think I'll review them in the morning rather than committing now.
>
> I decide to do this stuff in 2 steps:
> 1. configure option
> 2. PythonOption mod_python.mutex_directory
> PythonOption mod_python.mutex_locks
BTW, the commit seemed to miss newly generated src/include/mod_python.h
and
any notes added to Doc/appendixc.tex.
Graham
Re: [jira] Commented: (MODPYTHON-131) Make name of mutex directory
configurable.
Posted by Jim Gallacher <jp...@jgassociates.ca>.
I figured it was a mistake to do this late at night. :(
Graham Dumpleton (JIRA) wrote:
> [ http://issues.apache.org/jira/browse/MODPYTHON-131?page=comments#action_12369959 ]
>
> Graham Dumpleton commented on MODPYTHON-131:
> --------------------------------------------
>
> In respect of:
>
> http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/include/mod_python.h.in?rev=385000&r1=384999&r2=385000&view=diff
>
> I think you probably want:
>
> /* MUTEX_DIR can be set as a configure option
> * ./configure --with-mutex-dir=/path/to/dir
> */
> #define MUTEX_DIR "@MUTEX_DIR@"
>
> Ie., quote value of macro.
>
> And in:
>
> http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/mod_python.c?rev=385000&r1=384999&r2=385000&view=diff
>
> you probably want:
>
> snprintf(fname, 255, "%s/mpmtx%d%d", MUTEX_DIR, glb->parent_pid, n);
>
> Ie., MUTEX_DIR is substituted using %s, as macro will not be expanded in string.
This bit is going to change anyway when I add the PythonOption
mod_python.mutex_directory support. I have the changes ready, but I
think I'll review them in the morning rather than committing now.
I decide to do this stuff in 2 steps:
1. configure option
2. PythonOption mod_python.mutex_directory
PythonOption mod_python.mutex_locks
Jim