On Oct 3, 2011, at 1:36 AM, Graham Dumpleton wrote:
> How are you determining that there are two threads, a core stack dump?
No, it's the result of calling thread.get_ident() within the application
itself. See below.
> FWIW, I did see this issue recently, but was with a custom Apache
> source build and Apple Python 2.6.5. Using Apache and Python supplied
> by Apple, have no problems for same program that was causing the
> issue. If you can provide a simple WSGI hello world that shows the
> problem, then I can perhaps test it on my Apache/Python combo which I
> know might be susceptible as still have it set up.
Here you go. It's about as simple as it can be.
import subprocess, thread
def hello_world(environ, start_response):
s = subprocess.Popen(['whoami'], stdout=subprocess.PIPE).stdout.read()
start_response( '200 OK', [('Content-type', 'text/plain')])
return [str(thread.get_ident()), ' - ', s]
application = hello_world
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.