Logo Search packages:      
Sourcecode: fail2ban version File versions  Download package

def utils::pidlock::PIDLock::__impl::create (   self  ) 

Create PID lock.

Definition at line 51 of file pidlock.py.

00051                             :
                  """ Create PID lock.
                  """
                  try:
                        fileHandler = open(self.path, mode='w')
                        pid = os.getpid()
                        fileHandler.write(`pid` + '\n')
                        fileHandler.close()
                        logSys.debug("Created PID lock (" + `pid` + ") in " + self.path)
                        return True
                  except:
                        logSys.error("Unable to create PID lock " + self.path)
                        return False      
            
            def remove(self):


Generated by  Doxygen 1.6.0   Back to index