From 7950fc0f2e025e458b9194de9cc6ad7571d5354f Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 15 Jul 2009 00:29:29 -0700 Subject: [PATCH] node.py: record pid in twisted log at startup. Closes #476. --- src/allmydata/node.py | 5 +++++ 1 file changed, 5 insertions(+) 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: -- 2.45.2