def _find_own_cgroups():
    """
    For all subsystems, return the information in which (sub-)cgroup this process is in.
    (Each process is in exactly cgroup in each hierarchy.)
    @return a generator of tuples (subsystem, cgroup)
    """
    try:
        with open('/proc/self/cgroup', 'rt') as ownCgroupsFile:
            for cgroup in _parse_proc_pid_cgroup(ownCgroupsFile):
                yield cgroup
    except __HOLE__:
        logging.exception('Cannot read /proc/self/cgroup')
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/cgroups.py/_find_own_cgroups