Logo Search packages:      
Sourcecode: nagios-plugins version File versions  Download package

def utils::Task::Done (   self )
Ask whether the process has already finished.
   return value:
       1: yes, the process has finished.
       0: no, the process has not finished yet.

Definition at line 224 of file utils.py.

                  :
        """Ask whether the process has already finished.
           return value:
               1: yes, the process has finished.
               0: no, the process has not finished yet.
        """
        if self.status!=None:
            return 1
        else:
            pid,status=os.waitpid(self.pid,os.WNOHANG)
            if pid==self.pid:
                #print "OK:",pid,status
                self.status=status
                return 1
            else:
                #print "NOK:",pid,status
                return 0


Generated by  Doxygen 1.6.0   Back to index