X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/7f850a3c2ea48604f46c0b4f35904c4f2b117de1..60b2dd4c3fdb38c4c02f5d182745aec2a020eb69:/pymin/procman.py diff --git a/pymin/procman.py b/pymin/procman.py index b89b7e6..cb00f4f 100644 --- a/pymin/procman.py +++ b/pymin/procman.py @@ -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: