Skip to content

Commit

Permalink
Add the comment to make it understand ease
Browse files Browse the repository at this point in the history
Signed-off-by: utam0k <[email protected]>
  • Loading branch information
utam0k committed Nov 17, 2023
1 parent f493994 commit f64dff0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/libcontainer/src/rootfs/mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ impl Mount {

// get process cgroups
let ppid = std::os::unix::process::parent_id();
// The non-zero ppid means that the PID Namespace is not separated.
let ppid = if ppid == 0 { std::process::id() } else { ppid };
let root_cgroups = Process::new(ppid as i32)?.cgroups()?.0;
let process_cgroups: HashMap<String, String> = Process::myself()?
Expand Down

0 comments on commit f64dff0

Please sign in to comment.