Graham Dumpleton (JIRA) wrote:
[ http://issues.apache.org/jira/browse/MODPYTHON-77?page=all ]
Graham Dumpleton updated MODPYTHON-77:
--------------------------------------
Attachment: grahamd_20051105.tar.gz
Here is my first go at an alternate patch for this problem. Patch was made
against SVN head, believed to be 3.2.4b.
All the change in effect does is save the first interpreter as main_interpreter, but most
importantly it does this in Apache child process and not in the parent process before the
fork occurs as was the case before. This avoids problems on Mac OS X where Apache would
crash on "restart" and on Linux where Apache would crash after the request had
been handled.
Note that this change doesn't use any of the PEP GIL specific calls nor does it
do anything specific to make anything work on Python 2.3.5. Except for moving
one thread state swap call from the parent process context to the child process
context, all thread management code is the same.
The changes work fine on:
Mac OS X (10.3.9) / Apache 2.0.51 (worker) / Python 2.3 (Apple OS Installed)
Linux Fedora Code 2 / Apache 2.0.55 (prefork) / Python 2.3.5
Test example was gilstate.tar.gz attached to MODPYTHON-77.
Also passed on mod_python/test suite on Mac OS X. There were failures of test
suite on Linux, but those failures occurred before patches were applied as well.
Failures? What failures?
Jim