[Twisted-Python] How to stop a twisted daemon application.

Mike Kazantsev mk.fraggod at gmail.com
Fri Nov 14 15:44:41 EST 2008

On Fri, 14 Nov 2008 17:06:31 +1100
Tim Allen <screwtape at froup.com> wrote:

> On Fri, Nov 14, 2008 at 01:49:04PM +0800, Peter Cai wrote:
> > How can I stop it?  I've read through twistd manual and didn't find
> > anything about this.
> > 
> > I have to find the process and kill it.
> I believe the standard method of stopping a background twistd is:
>     kill $(cat twistd.pid)

I can suggest using "pkill -F twistd.pid" as a cleaner alternative.

You can also define your own handlers for received signals (via
signal module), to implement some custom shutdown sequence, for

Mike Kazantsev // fraggod.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20081115/38ac5f35/attachment.pgp 

More information about the Twisted-Python mailing list