node.py: make twistd.pid world-readable, so stats-gathering tools (specifically memory-measuring munin plugins) can see it

This commit is contained in:
Brian Warner 2008-03-26 18:37:54 -07:00
parent 1ad847d4b2
commit 3f5fed0bd4

View File

@ -150,6 +150,10 @@ class Node(service.MultiService):
def startService(self):
# Note: this class can be started and stopped at most once.
self.log("Node.startService")
try:
os.chmod("twistd.pid", 0644)
except EnvironmentError:
pass
# Delay until the reactor is running.
eventual.eventually(self._startService)