From: Brian Warner Date: Thu, 27 Mar 2008 01:37:54 +0000 (-0700) Subject: node.py: make twistd.pid world-readable, so stats-gathering tools (specifically memor... X-Git-Url: https://git.rkrishnan.org/pf/content/cyclelanguage?a=commitdiff_plain;h=3f5fed0bd42a590b0cf633cfc77ac338aede2acc;p=tahoe-lafs%2Ftahoe-lafs.git node.py: make twistd.pid world-readable, so stats-gathering tools (specifically memory-measuring munin plugins) can see it --- diff --git a/src/allmydata/node.py b/src/allmydata/node.py index 1bb9d708..e9481b84 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -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)