def get_parent_pid(pid):
    """
    Returns the parent PID for the given process

    :note: This is currently Linux specific.

    :param pid: The PID of child process
    :returns: The parent PID
    :rtype: int
    """
    with open('/proc/%d/stat' % pid, 'rb') as proc_stat:
        parent_pid = proc_stat.read().split(b' ')[-49]
        return int(parent_pid)
