mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-28 20:42:49 +00:00
rpc: Report PID of restore task on setup-namespaces script
This is the first time restorer gets info back from CRIU service. At that time it makes perfect sense to report what PID we're working with. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
2c90bb0ce5
commit
72bf807cfb
2 changed files with 11 additions and 0 deletions
10
cr-service.c
10
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;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ message criu_restore_resp {
|
|||
|
||||
message criu_notify {
|
||||
optional string script = 1;
|
||||
optional int32 pid = 2;
|
||||
}
|
||||
|
||||
enum criu_req_type {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue