[Twisted-Python] sigchld

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Fri Feb 11 11:55:45 EST 2011


On 03:59 pm, jrennie at gmail.com wrote:
>On Fri, Feb 11, 2011 at 10:01 AM, <exarkun at twistedmatrix.com> wrote:
>>On Python 2.5 and earlier you won't be able to get Twisted's SIGCHLD
>>handler using signal.getsignal.
>
>We're also moving to python 2.6 (the change is really Debian 5 to 
>Debian 6).
>Should it would work in 2.6?

I think so.
>
>>What sort of things do your signal handlers do?
>
>IIRC, the main thing is to shut down the web server (cherrypy) we're 
>running
>in parallel with twisted.  We also have some disk-caching for stateful
>signals which needs to ensure the cache file is up-to-date.

For shutdown-type things, reactor.addSystemEventTrigger(phase, 
'shutdown', f) might be better than getting into signal handlers (where 
phase is 'before', 'during', or 'after').

Jean-Paul



More information about the Twisted-Python mailing list