@staticmethod
def _read_pid_from_pidfile(pidfile_path):
    """
        Read the PID recorded in the named PID file.

        Read and return the numeric PID recorded as text in the named PID file. If the PID file cannot be read, or if
        the content is not a valid PID, return ``None``.

        """
    pid = None
    try:
        pidfile = open(pidfile_path, 'r')
    except IOError:
        pass
    else:
        line = pidfile.readline().strip()
        try:
            pid = int(line)
        except ValueError:
            pass
        pidfile.close()
    return pid
