wingo - in flumotion/trunk: . flumotion/common
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Tue Feb 20 18:24:18 CET 2007
Author: wingo
Date: Tue Feb 20 18:24:15 2007
New Revision: 4499
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/common/common.py
Log:
2007-02-20 Andy Wingo <wingo at pobox.com>
* flumotion/common/common.py (daemonizeHelper): Install a
post-shutdown hook to delete the PID file.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Tue Feb 20 18:24:15 2007
@@ -1,3 +1,8 @@
+2007-02-20 Andy Wingo <wingo at pobox.com>
+
+ * flumotion/common/common.py (daemonizeHelper): Install a
+ post-shutdown hook to delete the PID file.
+
2007-02-19 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* flumotion/component/encoders/theora/theora.py:
Modified: flumotion/trunk/flumotion/common/common.py
==============================================================================
--- flumotion/trunk/flumotion/common/common.py (original)
+++ flumotion/trunk/flumotion/common/common.py Tue Feb 20 18:24:15 2007
@@ -241,6 +241,15 @@
# from now on I should keep running until killed, whatever happens
path = writePidFile(processType, processName)
log.debug(processType, 'written pid file %s', path)
+
+ # import inside function so we avoid affecting startup
+ from twisted.internet import reactor
+ def deletePidFile():
+ log.debug(processType, 'deleting pid file')
+ common.deletePidFile(processType)
+ reactor.addSystemEventTrigger('after', 'shutdown',
+ deletePidFile)
+
def argRepr(args=(), kwargs={}, max=-1):
"""
More information about the flumotion-commit
mailing list