2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

opts: add --manage-cgroups option

criu managed cgroups is now an opt-in thing, so by default criu does not manage
(i.e. dump or restore) cgroups. This allows users to use the previous behavior.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Tycho Andersen
2014-08-06 22:23:00 +04:00
committed by Pavel Emelyanov
parent 8b019e0bb4
commit f95b05eb75
9 changed files with 24 additions and 2 deletions

View File

@@ -49,6 +49,7 @@ void init_opts(void)
INIT_LIST_HEAD(&opts.ext_mounts);
opts.cpu_cap = CPU_CAP_ALL;
opts.manage_cgroups = false;
}
static int parse_ns_string(const char *ptr)
@@ -167,6 +168,7 @@ int main(int argc, char *argv[])
{ "force-irmap", no_argument, 0, 58},
{ "ext-mount-map", required_argument, 0, 'M'},
{ "exec-cmd", no_argument, 0, 59},
{ "manage-cgroups", no_argument, 0, 60},
{ },
};
@@ -353,6 +355,9 @@ int main(int argc, char *argv[])
case 59:
has_exec_cmd = true;
break;
case 60:
opts.manage_cgroups = true;
break;
case 'M':
{
char *aux;
@@ -541,6 +546,7 @@ usage:
" --force-irmap force resolving names for inotify/fsnotify watches\n"
" -M|--ext-mount-map KEY:VALUE\n"
" add external mount mapping\n"
" --manage-cgroups dump or restore cgroups the process is in\n"
"\n"
"* Logging:\n"
" -o|--log-file FILE log file name\n"