def kill_all_tasks_recursively(self, kill_process_fn):
        def kill_all_tasks_in_cgroup_recursively(cgroup):
            files = [os.path.join(cgroup,f) for f in os.listdir(cgroup)]
            subdirs = filter(os.path.isdir, files)

            for subCgroup in subdirs:
                kill_all_tasks_in_cgroup_recursively(subCgroup)
                remove_cgroup(subCgroup)

            kill_all_tasks_in_cgroup(cgroup, kill_process_fn)

        for cgroup in self.paths:
            kill_all_tasks_in_cgroup_recursively(cgroup)
Kill all tasks in this cgroup and all its children cgroups forcefully.
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/cgroups.py/Cgroup.kill_all_tasks_recursively