Fix cgroup atomic mode break

This commit is contained in:
Ruihan Li 2025-12-09 23:56:02 +08:00 committed by Jianfeng Jiang
parent d299cf4db4
commit a7ecef2e58
1 changed files with 2 additions and 1 deletions

View File

@ -292,7 +292,8 @@ pub fn clone_child(
let child_process = clone_child_process(ctx, parent_context, clone_args)?;
let mut cgroup_guard = CgroupMembership::lock();
if let Some(cgroup) = ctx.process.cgroup().get() {
let cgroup = ctx.process.cgroup().get().map(|cgroup| cgroup.clone());
if let Some(cgroup) = cgroup {
cgroup_guard
.move_process_to_node(child_process.clone(), &cgroup)
.unwrap();