diff --git a/cr-service.c b/cr-service.c index 26dd3e275..1dec4afb3 100644 --- a/cr-service.c +++ b/cr-service.c @@ -125,6 +125,16 @@ int send_criu_rpc_script(char *script, int fd) msg.notify = &cn; cn.script = script; + if (!strcmp(script, "setup-namespaces")) { + /* + * FIXME pid is required only once on + * restore. Need some more sane way of + * checking this. + */ + cn.has_pid = true; + cn.pid = root_item->pid.real; + } + ret = send_criu_msg(fd, &msg); if (ret < 0) return ret; diff --git a/protobuf/rpc.proto b/protobuf/rpc.proto index 23a9f01de..90f9dc206 100644 --- a/protobuf/rpc.proto +++ b/protobuf/rpc.proto @@ -39,6 +39,7 @@ message criu_restore_resp { message criu_notify { optional string script = 1; + optional int32 pid = 2; } enum criu_req_type {