]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
node.py: record pid in twisted log at startup. Closes #476.
authorBrian Warner <warner@lothar.com>
Wed, 15 Jul 2009 07:29:29 +0000 (00:29 -0700)
committerBrian Warner <warner@lothar.com>
Wed, 15 Jul 2009 07:29:29 +0000 (00:29 -0700)
src/allmydata/node.py

index c695bd0d6ae7c39dbe10cc095f494ae1f7be2e1b..790ed0433985272f2125e631b94a718923518519 100644 (file)
@@ -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: