/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Teddy Hogeborn
  • Date: 2012-06-24 03:45:55 UTC
  • mto: (237.7.272 trunk)
  • mto: This revision was merged to the branch mainline in revision 303.
  • Revision ID: teddy@recompile.se-20120624034555-7p0dtbpsz0dgsn4d
* mandos (Client.start_checker): Add comment.  Break long line.

Show diffs side-by-side

added added

removed removed

Lines of Context:
717
717
            except OSError as error:
718
718
                logger.error("Failed to start subprocess",
719
719
                             exc_info=error)
 
720
                return True
720
721
            self.checker_callback_tag = (gobject.child_watch_add
721
722
                                         (self.checker.pid,
722
723
                                          self.checker_callback,
723
724
                                          data=command))
724
725
            # The checker may have completed before the gobject
725
726
            # watch was added.  Check for this.
726
 
            pid, status = os.waitpid(self.checker.pid, os.WNOHANG)
 
727
            try:
 
728
                pid, status = os.waitpid(self.checker.pid, os.WNOHANG)
 
729
            except OSError as error:
 
730
                if error.errno == errno.ECHILD:
 
731
                    # This should never happen
 
732
                    logger.error("Child process vanished",
 
733
                                 exc_info=error)
 
734
                    return True
 
735
                raise
727
736
            if pid:
728
737
                gobject.source_remove(self.checker_callback_tag)
729
738
                self.checker_callback(pid, status, command)