I don&#39;t know of a portable way to do this, but...<br><br>The &quot;stopService&quot; method that you referenced is probably not what you want.&nbsp; <br>It stops a twisted service object, which you should have created in your .tac file, but does not stop twistd.<br>
<br>I know diddly about how to stop and start service/daemon processes on MacOS, but on Win32, you have a lot of options:<br>- rewrite things to use pywin32&#39;s services support...this typically involves starting the reactor manually, though<br>
- there&#39;s some code in the twisted svn sandbox (look under moonfallen) that does something like this using py2exe (haven&#39;t used this though)<br>- take your twistd command line and use &quot;instsrv&quot; and &quot;srvany&quot; to make it run as a service (maybe)<br>
<br>Good luck!<br><br>Kevin Horn<br><br><br><div class="gmail_quote">On Tue, Jul 1, 2008 at 4:53 PM, Jeff Dyke &lt;<a href="mailto:jeff.dyke@gmail.com">jeff.dyke@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m looking for a portable way to stop and start a twisted<br>
application, specifically a &nbsp;twisted.web.xmlrpc server being started<br>
with a .tac file via twistd. &nbsp;on ubuntu i can easily use the<br>
start-stop-daemon but some other developers are using mac/windows and<br>
i was looking for a nice way for all to be able to start and stop this<br>
server as they make changes to it, aside from kill/killproc that is.<br>
<br>
I noticed that the object returned after calling internet.SSLServer<br>
server has a method called stopService, but am confused about how to<br>
use that, after starting it with twistd. &nbsp;Perhaps twistd is not the<br>
right approach for starting? &nbsp;googling around seems to bring up<br>
arguments from years past about if this behavior belongs in twisted on<br>
in the users app, but found no real solution...but may have missed the<br>
obvious.<br>
<br>
Thanks<br>
Jeff<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</blockquote></div><br>