libcontainer: Initial version of cgroups support

This is a minimal version of raw cgroup support for libcontainer.
It has only enough for what docker needs, and it has no support
for systemd yet.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
This commit is contained in:
Alexander Larsson 2014-02-20 23:12:08 +01:00 committed by Michael Crosby
parent 8590435fa0
commit 3de41b34a2
6 changed files with 218 additions and 10 deletions

View file

@ -20,12 +20,10 @@ func initCommand(container *libcontainer.Container, console string, args []strin
return err
}
var tempVethName string
if container.Network != nil {
tempVethName, err = getVethName()
if err != nil {
return err
}
// We always read this as it is a way to sync with the parent as well
tempVethName, err := getVethName()
if err != nil {
return err
}
// close pipes so that we can replace it with the pty