[Twisted-Python] Daemon processes on windows

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Sat Nov 7 18:25:47 MST 2009


On 01:18 am, ellisonbg.net at gmail.com wrote:
>Hi,
>
>I have a server-like process that uses twisted.  I need it to daemonize
>itself and on linux/os x I am simply
>using the daemonize function from twistd.  This works fine.  What about
>Windows though....I saw that the
>win32 version of twistd doesn't have (unless I am missing it) the 
>ability to
>daemonize a process.
>
>Is is simply impossible to daemonize a process on windows?  If so, is 
>there
>any way to have a child
>process on windows ignore SIGINT send to the parent?

Windows doesn't really have daemons the same way POSIX does.  It has, 
instead, "NT services".  It would be super excellent for twistd to 
support these somehow.  Cory Dodt did some work on this years back, I 
think, but it never reached a point where it was suitable for inclusion. 
It might be interesting to review that work and see if someone can pick 
up where he left off.  You can find his code in svn in 
/sandbox/moonfallen/ntsvc.

Jean-Paul




More information about the Twisted-Python mailing list