浏览代码

*** empty log message ***

Chris McDonough 19 年之前
父节点
当前提交
3aacb68efd
共有 3 个文件被更改,包括 10 次插入1 次删除
  1. 2 0
      CHANGES.txt
  2. 5 0
      TODO.txt
  3. 3 1
      src/supervisor/supervisord.py

+ 2 - 0
CHANGES.txt

@@ -1,5 +1,7 @@
 Next
 
+  - pidfile written in daemon mode had incorrect pid.
+
   - supervisorctl: tail (non -f) did not pass through proper error
     messages when supplied by the server.
 

+ 5 - 0
TODO.txt

@@ -16,3 +16,8 @@
 
 - Test on Linux.
 
+- Provide a way to get the supervisord pid from supervisorctl/web interface.
+
+- Provide a way to tail the activity log from within supervisorctl/
+  web interface.
+

+ 3 - 1
src/supervisor/supervisord.py

@@ -457,11 +457,13 @@ class Supervisor:
             name = program.name
             self.processes[name] = self.options.make_process(program)
         try:
-            self.options.write_pidfile()
             self.options.openhttpserver(self)
             self.options.setsignals()
             if not self.options.nodaemon:
                 self.options.daemonize()
+            # writing pid file needs to come *after* daemonizing or pid
+            # will be wrong
+            self.options.write_pidfile()
             self.runforever(test)
         finally:
             self.options.cleanup()