On Tue, Apr 14, 2009 at 05:32:22PM +0200, Pier Maria Mattioli wrote:
> Hi! I think to have a problem using scgi python module.
> If I send a SIG_HUP signal to the server it will reload all handlers by 
> closing all fp and waiting the children until the end of the last  
> children's exection.
> If I send another SIG_HUP signal before the last chidren has gone ( and 
> the server is in the os.waitpid at line 221 of scgi_server.py ) then the 
> server
> raise this error:
>
>   File "scgi_server.py", line 337, in serve
>   File "scgi_server.py", line 334, in serve_on_socket
>   File "scgi_server.py", line 226, in do_restart
>   File "scgi_server.py", line 221, in do_stop
> OSError: [Errno 4] Interrupted system call
>
> My problem is that I need an automatic reload of all handlers when some 
> python source has been modified. So the hangup signal can be sent many 
> time in a few time ( and never be sent for hours! ). Is there any 
> solution?


I think you would need to change the do_stop or do_restart function
to catch the interrupted system call OSError and retry (exc.errno ==
errno.EAGAIN).  This is a Unix system quirk that I'm not fond of.

If you come up with a patch, I would be happy to include it.  Jon
Corbet (of LWN.net fame) was the original author of the restart
functionality.  You might try contacting him for advise.

Regards,

  Neil
_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users

Reply via email to