@@ -24,7 +24,7 @@ pub struct CGroup1 {
2424 /// Absolute path of the cgroup, e.g. `/sys/fs/cgroup/net_cls/foobar`
2525 path : PathBuf ,
2626
27- /// `cgroup.procs` is used to add and list PIDs in the cgroup2 .
27+ /// `cgroup.procs` is used to add and list PIDs in the cgroup .
2828 procs : File ,
2929}
3030
@@ -89,7 +89,7 @@ impl CGroup1 {
8989 Self :: open ( child_path)
9090 }
9191
92- /// Try to clone the cgroup2 handle.
92+ /// Try to clone the cgroup handle.
9393 ///
9494 /// This is fallible because cloning file descriptors can fail.
9595 pub fn try_clone ( & self ) -> Result < Self , super :: Error > {
@@ -102,7 +102,7 @@ impl CGroup1 {
102102 } )
103103 }
104104
105- /// Assign a process to this cgroup2 .
105+ /// Assign a process to this cgroup .
106106 pub fn add_pid ( & self , pid : Pid ) -> Result < ( ) , super :: Error > {
107107 // Format the PID as a string
108108 let mut pid_buf = [ 0u8 ; 16 ] ;
@@ -111,12 +111,12 @@ impl CGroup1 {
111111
112112 // Write PID to `cgroup.procs`.
113113 nix:: unistd:: write ( & self . procs , pid_str. to_bytes ( ) )
114- . with_context ( || anyhow ! ( "Failed to add process {pid} to cgroup2 " ) ) ?;
114+ . with_context ( || anyhow ! ( "Failed to add process {pid} to cgroup " ) ) ?;
115115
116116 Ok ( ( ) )
117117 }
118118
119- /// List all PIDs in this cgroup2 .
119+ /// List all PIDs in this cgroup .
120120 pub fn list_pids ( & mut self ) -> Result < Vec < pid_t > , super :: Error > {
121121 let mut file = & self . procs ;
122122 let mut pids = String :: new ( ) ;
0 commit comments