From 0e88a91ff025c11f53caa53d75b76c9c6b00dfdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Date: Fri, 16 Sep 2022 11:01:48 +0200 Subject: [PATCH] Allow passing --leave_stopped by RPC. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Mirosław --- criu/cr-service.c | 3 +++ images/rpc.proto | 1 + 2 files changed, 4 insertions(+) diff --git a/criu/cr-service.c b/criu/cr-service.c index 314c309be..ed4f1edef 100644 --- a/criu/cr-service.c +++ b/criu/cr-service.c @@ -428,6 +428,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req) if (req->has_leave_running && req->leave_running) opts.final_state = TASK_ALIVE; + if (req->has_leave_stopped && req->leave_stopped) + opts.final_state = TASK_STOPPED; + if (!req->has_pid) { req->has_pid = true; req->pid = ids.pid; diff --git a/images/rpc.proto b/images/rpc.proto index afd2c7b43..6451e9b73 100644 --- a/images/rpc.proto +++ b/images/rpc.proto @@ -140,6 +140,7 @@ message criu_opts { optional bool mntns_compat_mode = 65; optional bool skip_file_rwx_check = 66; optional bool unprivileged = 67; + optional bool leave_stopped = 69; /* optional bool check_mounts = 128; */ }