[Twisted-Python] Running twistd and tac files as Windows service

John Aherne johnaherne at rocs.co.uk
Wed Oct 24 03:43:15 EDT 2012


> To start off with, I'll point out that this isn't a supported mode of
> running Twisted (which I'm sure you noticed already :).
>
> This feature has been requested several times and worked on by a couple
> people, but not quite to the point of completion.
>
> Here's a related ticket:
>
>     http://twistedmatrix.com/trac/ticket/4073
>
> There's also some more code in the sandbox:
>
>     http://twistedmatrix.com/trac/browser/sandbox/moonfallen
>
> BuildBot also has some code, though I'm not exactly sure where it is.
> It would be really great for someone to actually complete and generalize
> one or more of these initial attempts so that Windows service
> integration could be a real, working feature. :)
>
>
> Yes, you'll need to do that.  It probably won't even break child process
> support (although other aspects of Windows services probably will).
> Notice it's failing on installing a SIGINT handler - ie, a Control-C
> handler.  Since you want the thing to run as a service, you probably
> aren't very interested in having Control-C do anything.
>
> Jean-Paul
>
> Thanks for the pointers.

Some of the code seems pretty ancient and for setting up the service I
think the win32com stuff from Mark Hammond seems to have all covered.

I have started to look around twisted to see where I can stop the signal
handlers being installed.. I have landed in postApplication where
startReactor is called, but I have yet to work out how I can set
installSignalHandlers=False.

Am I right in assuming this is where I should be looking.

I don't have much idea about signalhandlers but I assume the one I am
interested in here is to stop ControlC. The others might need to stay on.
I'm not too sure about that without knowing more about windows services and
how they react to these signals.

Thanks for the pointers

John Aherne

> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



-- 
*John Aherne*
*
*
*
*
*
*
*www.rocs.co.uk
*
020 7223 7567
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20121024/e77608ee/attachment.htm 


More information about the Twisted-Python mailing list