]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/criu.c
cgroup: cgroup_escape takes no arguments
authorTycho Andersen <tycho.andersen@canonical.com>
Thu, 10 Mar 2016 18:10:14 +0000 (11:10 -0700)
committerTycho Andersen <tycho.andersen@canonical.com>
Thu, 10 Mar 2016 19:01:34 +0000 (12:01 -0700)
commit7103fe6f08cb04a498e3090d8416b4275a4a0d7e
treeb9abae47b6b34be861fdcce0dff5cd3a84efccd2
parent9451eeffb0688b801034d963c455c8b31ccbf28c
cgroup: cgroup_escape takes no arguments

cgroup_escape() is a slight abuse of the cgroup code: what we really want
here is to escape the *current* process, whether it happens to be the LXC
monitor or not, into the / cgroups.

In the case of dump, we can't do an lxc_init(), because:

lxc 20160310103501.547 ERROR    lxc_commands - commands.c:lxc_cmd_init:993 - ##
lxc 20160310103501.547 ERROR    lxc_commands - commands.c:lxc_cmd_init:994 - # The container appears to be already running!
lxc 20160310103501.547 ERROR    lxc_commands - commands.c:lxc_cmd_init:995 - ##

We don't want to make this a command to send to the handler, because again,
cgroup_escape() is intended to escape the *current* task to the root
cgroups.

So, let's just have cgroup_escape() build its own handler when required.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
src/lxc/cgfsng.c
src/lxc/cgroup.h
src/lxc/criu.c