=== modified file 'mandos' --- mandos 2012-06-23 00:58:49 +0000 +++ mandos 2012-06-23 13:50:05 +0000 @@ -717,13 +717,20 @@ except OSError as error: logger.error("Failed to start subprocess", exc_info=error) + return True self.checker_callback_tag = (gobject.child_watch_add (self.checker.pid, self.checker_callback, data=command)) # The checker may have completed before the gobject # watch was added. Check for this. - pid, status = os.waitpid(self.checker.pid, os.WNOHANG) + try: + pid, status = os.waitpid(self.checker.pid, os.WNOHANG) + except OSError as error: + if error.errno == errno.ECHILD: + logger.error("Child process vanished", exc_info=error) + return True + raise if pid: gobject.source_remove(self.checker_callback_tag) self.checker_callback(pid, status, command)