def get_pid(env):
    """
    Reads and returns the daemon's pid from pid file on disk>

    Returns None on failure.
    """
    try:
        with open(env['pid_file_path'], 'r') as fd:
            pid = int(fd.read().strip())
    except IOError:
        pid = None
    return pid