467,146 Members | 1,256 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,146 developers. It's quick & easy.

twisted signal handler override or cleanup code

Hi,

google doesn't give me anything on this, so I have to ask:

I've got a xmlrpc-server running using twisted. Using the cookbook-recipe
for daemonizing, it stores a file with its pid when in daemon mode.

Now I want to remove that file when the server is shutdown - this boils down
to the twisted reactors run()-method beeing terminated.

Unfortunately, twisted sets its on signal handlers, so killing my app
doesn't allow me to perform cleanup-code. I'm sure there are good reasons
for that, and I'm actually not interested in signals especially - but there
must be some way to install a sort of callback when the reactor gets down,
for whatever reason.

But as I said, no docs on that.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #1
  • viewed: 3778
Share:
1 Reply
Diez B. Roggisch wrote:
Hi,

google doesn't give me anything on this, so I have to ask:

I've got a xmlrpc-server running using twisted. Using the cookbook-recipe
for daemonizing, it stores a file with its pid when in daemon mode.

Now I want to remove that file when the server is shutdown - this boils down
to the twisted reactors run()-method beeing terminated.

Unfortunately, twisted sets its on signal handlers, so killing my app
doesn't allow me to perform cleanup-code. I'm sure there are good reasons
for that, and I'm actually not interested in signals especially - but there
must be some way to install a sort of callback when the reactor gets down,
for whatever reason.

But as I said, no docs on that.


http://twistedmatrix.com/documents/c...wistd-man.html

http://twistedmatrix.com/documents/c...to/application

Jp
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Gary Robinson | last post: by
2 posts views Thread by lpw | last post: by
3 posts views Thread by Martin McCormick | last post: by
11 posts views Thread by Jackie | last post: by
7 posts views Thread by Amit Sharma | last post: by
1 post views Thread by stalex | last post: by
5 posts views Thread by david@quanterium.zzn.com | last post: by
5 posts views Thread by Yves Dorfsman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.