docs: def get_pid(rundir, process_type=PROCESS_TYPE, name=None):
      """
      Get the pid from the pid file in the run directory, using the given
      process type and process name for the filename.
  
      @returns: pid of the process, or None if not running or file not found.
      """
      pidPath = get_pidpath(rundir, process_type, name)
      log.log('run', 'pidfile for %s %s is %s' % (process_type, name, pidPath))
  
      if not os.path.exists(pidPath):
          return
  
      pidFile = open(pidPath, 'r')
      pid = pidFile.readline()
      pidFile.close()
      if not pid or int(pid) == 0:
          return
  
      return int(pid)