]> git.llucax.com Git - software/pymin.git/blobdiff - pymin/procman.py
Remove unused ProcessInfo.last_return attribute.
[software/pymin.git] / pymin / procman.py
index b89b7e63d6eeac0e5583904e85c30a0acf1c6f71..cb00f4ff54647ef66b621251ab36238aaba5aafc 100644 (file)
@@ -26,7 +26,6 @@ class ProcessInfo:
         self.signal = None
         self.process = None
         self.error_count = 0
-        self.last_return = None
         self.running = False
     def start(self):
         assert self.process is None
@@ -95,12 +94,13 @@ class ProcessManager:
         try:
             (pid, status) = os.waitpid(-1, os.WNOHANG)
         except OSError, e:
-            if e.errno is e.ECHILD:
+            if e.errno is errno.ECHILD:
                 return
             raise
         while pid:
             if pid in self.pidmap:
                 p = self.pidmap[pid]
+                p.process.returncode = status
                 if p.callback is not None:
                     p.callback(self, p)
                 if p.dont_run or not p.persist or p.error_count >= p.max_errors: