On Jan 29, 2008 2:15 AM, Philip Jenvey <[EMAIL PROTECTED]> wrote: > >> Is there a way to get notified when your application is about to be > >> shut down? Paste looks like it just sends SIGTERM to the process > >> when > >> it detects a modified file, but maybe I'm missing something. > >> > > If Cliff's suggestion doesn't work -- in general, the way to get a > callback when python quits is via the atexit module.
I've tried to register a function via atexit, but it's not being called. This is probably because, according to the atexit docs, "Note: the functions registered via this module are not called when the program is killed by a signal, when a Python fatal internal error is detected, or when os._exit() is called." I'll give Cliff's suggestion a try and see how that goes. The avahi bindings for python are pretty barebones, I was hoping not to have to get into that :) Cheers, Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
