2009/2/25 Martin (gzlist) <[email protected]>:
> On 25/02/2009, Graham Dumpleton <[email protected]> wrote:
>>
>>
>>  What I need is someone on Windows who knows ctype voodoo. In
>>  particular, want to replace call to os.kill() with a ctypes call to
>>  ap_signal_parent() with argument of SIGNAL_PARENT_RESTART. This should
>>  have effect of telling Apache parent process to restart the single
>>  child process that exists on Windows.
>>
>>  Any takers?
>
> Tried with the code:
>
> def application(environ, start_response):
>        import ctypes
>        ctypes.windll.libhttpd.ap_signal_parent(1)
>        result = "restart tried"
>        start_response("200 OK", [
>                ("Content-Type", "text/plain; charset=UTF-8"),
>                ("Content-Length", str(len(result)))])
>        return [result]
>
> You'll notice several things from the error log, #1 I should really
> update to the latest minor version of several things, #2 seems to have
> gone down and come back up again fine. A small amount of further
> testing didn't show up any obvious issues.
>
> Not sure how pleasant an idea doing this is for every script change
> is, at least with httpd -k restart you know when it's happening.

Yes, but it is much better option than what people generally do which is to set:

  MaxRequestsPerChild 1

as it will only occur when a change has actually been made.

Thanks for working this out for me. I'll update the example code in
wiki and get someone to try it with a real application.

Graham

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to