]> git.proxmox.com Git - mirror_lxcfs.git/commit - lxcfs.c
lxcfs, bindings: share cgroup info + add clone()
authorChristian Brauner <cbrauner@suse.de>
Fri, 5 Aug 2016 12:17:15 +0000 (14:17 +0200)
committerChristian Brauner <cbrauner@suse.de>
Mon, 8 Aug 2016 18:00:29 +0000 (20:00 +0200)
commit4e3f18fb94945276525ecf807b094cbd26ad04fb
tree1b31348d63da295bbd1a5892807ff3aa1fad2bfc
parent8cb31294944c4786e1ab55650c674b619adbf68d
lxcfs, bindings: share cgroup info + add clone()

- So far lxcfs.c and bindings.{c,h} did not share cgroup information and we
  unnecessarily kept parsing and storing additional information. Let's share it
  instead.
- Add lxcfs_clone() function.
- Mount cgroups in a private mount namespace. We use CLONE_FILES so that file
  descriptors opened via lxcfs_clone() are not copied and hence are valid in
  child and parent.
- For each mounted hierarchy, open a file descriptor and store it in an mmap()ed
  array that is MAP_SHARED between parent and child.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
bindings.c
bindings.h
lxcfs.c