Unmount cgroup FS after use
This commit is contained in:
parent
edab0fe9e4
commit
0498920fce
7
cgroup.c
7
cgroup.c
@ -25,6 +25,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/types.h>
|
||||
@ -64,5 +65,11 @@ bool cgroupInitNs(struct nsjconf_t *nsjconf)
|
||||
return false;
|
||||
}
|
||||
|
||||
LOG_D("Unmounting '%s'", nsjconf->cgroup_mem_mount);
|
||||
if (umount2(nsjconf->cgroup_mem_mount, MNT_DETACH) == -1) {
|
||||
PLOG_E("Could not umount2('%s', MNT_DETACH)", nsjconf->cgroup_mem_mount);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user