[Supervisor-checkins] r897 - in superlance/trunk: . superlance

Chris McDonough chrism at agendaless.com
Thu Oct 15 20:55:58 EDT 2009


Author: Chris McDonough <chrism at agendaless.com>
Date: Thu Oct 15 20:55:58 2009
New Revision: 897

Log:
- Apply patch from Sam Bartlett: processes which are not autostarted
  have pid "0".  This was crashing memmon.




Modified:
   superlance/trunk/CHANGES.txt
   superlance/trunk/superlance/memmon.py

Modified: superlance/trunk/CHANGES.txt
==============================================================================
--- superlance/trunk/CHANGES.txt	(original)
+++ superlance/trunk/CHANGES.txt	Thu Oct 15 20:55:58 2009
@@ -7,6 +7,9 @@
 
 - Fixed the tests for memmon to import the correct module.
 
+- Apply patch from Sam Bartlett: processes which are not autostarted
+  have pid "0".  This was crashing memmon.
+
 0.5 (2009-05-24)
 
 - Added ``memmon`` script, originally bundled with supervisor and

Modified: superlance/trunk/superlance/memmon.py
==============================================================================
--- superlance/trunk/superlance/memmon.py	(original)
+++ superlance/trunk/superlance/memmon.py	Thu Oct 15 20:55:58 2009
@@ -131,6 +131,11 @@
                 group = info['group']
                 pname = '%s:%s' % (group, name)
 
+                if not pid:
+                    # ps throws an error in this case (for processes
+                    # in standby mode, non-auto-started).
+                    continue
+
                 data = shell(self.pscommand % pid)
                 if not data:
                     # no such pid (deal with race conditions)


More information about the Supervisor-checkins mailing list