[modwsgi] How to be notified when client is gone away

2012-07-20 Thread lvqier
I am confused with the following code (test.py), which is a wsgi application: #!/usr/bin/env python from subprocess import Popen, PIPE import os cwd = os.path.dirname(os.path.abspath(__file__)) exe = os.path.join(cwd, 'wait.py') def application(environ, start_response): process_args

Re: [modwsgi] How to be notified when client is gone away

2012-07-20 Thread Graham Dumpleton
There isn't really a way. You can read past discussions on this in the group archives about points where closure may be detected. One such discussion is: https://groups.google.com/d/msg/modwsgi/jr2ayp0xesk/QtINxMi_KUAJ Graham On 19 July 2012 22:55, lvqier lvq...@gmail.com wrote: I am confused

[modwsgi] mod_wsgi and mod_ruid2

2012-07-20 Thread slech
Hello Everyone. I have an issue to install moin wiki with mod_ruid. Moin wiki is python based app and I start it via Apache and mod_wsgi. All work fine without mod_ruid2. And also work fine if I manually change permission to the */var/run/wsgi/moin.32282.0.1.sock* file chown www-moin:www-moin

Re: [modwsgi] mod_wsgi and mod_ruid2

2012-07-20 Thread Graham Dumpleton
There is no builtin support for mod_ruid2. You may be able to get it working by modifying the mod_wsgi source code. Look for: /* * Set the ownership of the UNIX listener socket. This would * normally be the Apache user that the Apache server child * processes run as, as they

[modwsgi] Re: mod_wsgi and mod_ruid2

2012-07-20 Thread slech
Thank you for reply! I tried: apt-get remove libapache2-mod-wsgi # /usr/local/src wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz tar -zxvf mod_wsgi-3.3.tar.gz cd mod_wsgi-3.3 vi mod_wsgi.c Change: #if defined(MPM_ITK) if (chown(process-socket, process-uid, -1) 0) { #else

Re: [modwsgi] Re: mod_wsgi and mod_ruid2

2012-07-20 Thread Graham Dumpleton
Use: WSGIDaemonProcess moin user=www-moin group=www-moin home=/tmp processes=5 threads=10 maximum-requests=1000 umask=0007 That is, add home=/tmp argument. This will get rid of complaint about not being able to change home directory. Graham On 20 July 2012 10:20, slech xum...@gmail.com wrote: