diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-06-10 12:04:48 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-06-10 12:04:48 +0200 |
| commit | 146842f92119f65032d3063812f09cbbcd6db635 (patch) | |
| tree | e5b3fbe31decf3690b19fe47a00b592e521c78ee /man7 | |
| parent | c919e22f82997668dab3607f627a6778a72c8094 (diff) | |
| download | man-pages-146842f92119f65032d3063812f09cbbcd6db635.tar.gz | |
cgroup_namespaces.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7')
| -rw-r--r-- | man7/cgroup_namespaces.7 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/man7/cgroup_namespaces.7 b/man7/cgroup_namespaces.7 index 842e0b8d2d..773379aeb8 100644 --- a/man7/cgroup_namespaces.7 +++ b/man7/cgroup_namespaces.7 @@ -102,11 +102,11 @@ Next, we use .BR unshare (1) to create a process running a new shell in new cgroup and mount namespaces: .PP -.EX .in +4n +.EX # \fBPS1="sh2# " unshare \-Cm bash\fP -.in .EE +.in .PP From the new shell started by .BR unshare (1), @@ -118,16 +118,16 @@ a process that is in the initial cgroup namespace with PID 1), and the process in the sibling cgroup .RI ( sub2 ): .PP -.EX .in +4n +.EX sh2# \fBcat /proc/self/cgroup | grep freezer\fP 7:freezer:/ sh2# \fBcat /proc/1/cgroup | grep freezer\fP 7:freezer:/.. sh2# \fBcat /proc/20124/cgroup | grep freezer\fP 7:freezer:/../sub2 -.in .EE +.in .PP From the output of the first command, we see that the freezer cgroup membership of the new shell @@ -147,12 +147,12 @@ However, when we look in .IR /proc/self/mountinfo we see the following anomaly: .PP -.EX .in +4n +.EX sh2# \fBcat /proc/self/mountinfo | grep freezer\fP 155 145 0:32 /.. /sys/fs/cgroup/freezer ... -.in .EE +.in .PP The fourth field of this line .RI ( /.. ) @@ -169,16 +169,16 @@ To fix this problem, we must remount the freezer cgroup filesystem from the new shell (i.e., perform the mount from a process that is in the new cgroup namespace), after which we see the expected results: .PP -.EX .in +4n +.EX sh2# \fBmount \-\-make\-rslave /\fP # Don't propagate mount events # to other namespaces sh2# \fBumount /sys/fs/cgroup/freezer\fP sh2# \fBmount \-t cgroup \-o freezer freezer /sys/fs/cgroup/freezer\fP sh2# \fBcat /proc/self/mountinfo | grep freezer\fP 155 145 0:32 / /sys/fs/cgroup/freezer rw,relatime ... -.in .EE +.in .\" .SH CONFORMING TO Namespaces are a Linux-specific feature. |
