Author: dmeyer
Date: Sun Dec 2 08:08:40 2007
New Revision: 2909
Log:
fix signal handling
Modified:
trunk/base/src/notifier/__init__.py
Modified: trunk/base/src/notifier/__init__.py
==============================================================================
--- trunk/base/src/notifier/__init__.py (original)
+++ trunk/base/src/notifier/__init__.py Sun Dec 2 08:08:40 2007
@@ -184,9 +184,12 @@
running = False
shutdown()
-# # catch SIGTERM if possible for a clean shutdown
+# catch SIGTERM and SIGINT if possible for a clean shutdown
if threading.enumerate()[0] == threading.currentThread():
- signal.signal(signal.SIGTERM, _shutdown_check)
+ def signal_handler(*args):
+ sys.exit(0)
+ signal.signal(signal.SIGTERM, signal_handler)
+ signal.signal(signal.SIGINT, signal_handler)
else:
log.info('kaa imported from thread, disable SIGTERM handler')
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog