[Twisted-Python] handling SIGCHLD

Jason Rennie jrennie at gmail.com
Tue Jun 8 11:25:41 MDT 2010


Two options:

   1. (as Itamar notes) use spawnProcess for all your process spawning needs
   2. reactor.run(installSignalHandlers = False) and do your own signal
   handling

For option #2, you'll almost certainly want to install SIGTERM and SIGINT
handlers which call reactor.stop().

Jason

On Tue, Jun 8, 2010 at 12:36 PM, Michael P. Soulier <
msoulier at digitaltorque.ca> wrote:

> Hi,
>
> I have a twisted service that needs to fork child processes to do tasks,
> after
> which they will exit. I wrote a signal handler for SIGCHLD but it didn't
> seem
> to be called. I read something about twisted installing its own signal
> handlers that may conflict. Is this true?
>
> How would you recommend handling a SIGCHLD in twisted?
>
> Many thanks,
> Mike
> --
> Michael P. Soulier <msoulier at digitaltorque.ca>
> "Any intelligent fool can make things bigger and more complex... It takes a
> touch of genius - and a lot of courage to move in the opposite direction."
> --Albert Einstein
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkwOcYkACgkQKGqCc1vIvggbUACfY8xqgU2LLOrs0cfR7HngUqmc
> LOQAoKkur5+DK8lcZ+q6qWDtjqIpX3Ov
> =XM/4
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>


-- 
Jason Rennie
Research Scientist, ITA Software
617-714-2645
http://www.itasoftware.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20100608/6571d220/attachment.html>


More information about the Twisted-Python mailing list