From: Brian Warner Date: Wed, 15 Jul 2009 07:29:29 +0000 (-0700) Subject: node.py: record pid in twisted log at startup. Closes #476. X-Git-Tag: trac-4000~6 X-Git-Url: https://git.rkrishnan.org/pf/content/en/statistics?a=commitdiff_plain;h=7950fc0f2e025e458b9194de9cc6ad7571d5354f;p=tahoe-lafs%2Ftahoe-lafs.git node.py: record pid in twisted log at startup. Closes #476. --- diff --git a/src/allmydata/node.py b/src/allmydata/node.py index c695bd0d..790ed043 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -238,6 +238,11 @@ class Node(service.MultiService): def startService(self): # Note: this class can be started and stopped at most once. self.log("Node.startService") + # Record the process id in the twisted log, after startService() + # (__init__ is called before fork(), but startService is called + # after). Note that Foolscap logs handle pid-logging by itself, no + # need to send a pid to the foolscap log here. + twlog.msg("My pid: %s" % os.getpid()) try: os.chmod("twistd.pid", 0644) except EnvironmentError: