[Twisted-Python] twisted robot ...
exarkun at divmod.com
Tue Apr 26 00:39:59 EDT 2005
On Tue, 26 Apr 2005 14:21:42 +1000, Grant McDonald <gmcdonald at infocomp.com> wrote:
>> Twisted does care about this for signal handling. If Twisted is run in a
>> thread it will not be able to do shutdown based on signals or run
>> processes correctly (though if you install your own signal handlers that
>> forward info to twisted it can be made to work).
>Are there examples of installing signal handlers and forwarding signal
>information to a twisted thread?
There isn't actually a public API for this.
With almost all of the reactors included in Twisted, though:
from twisted.internet import reactor
# Do your own SIGINT processing, or whatever.
# Do your own SIGCHLD processing, or whatever.
(etc) will work. However, those two methods really are not public (one of them even looks the part), and could change at any time. If you are really interested in doing this, give a shout, and perhaps the interface can be extended so that it's possible to do in a supported way. Otherwise, don't be surprised if it breaks :)
More information about the Twisted-Python