[CRIU] [PATCH]v2 service: don't send dump response in case of self-dump without leave_running
Ruslan Kuprieiev
kupruser at gmail.com
Mon Dec 2 08:16:49 PST 2013
Currently we have a bug: if no leave_running is set in request, service won't send dump response. We must not send response only if it was a self-dump request and no leave_running option was set.
Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
cr-service.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cr-service.c b/cr-service.c
index eba5342..d34a9c3 100644
--- a/cr-service.c
+++ b/cr-service.c
@@ -166,6 +166,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
static int dump_using_req(int sk, CriuOpts *req)
{
bool success = false;
+ bool self_dump;
+
+ self_dump = !req->pid;
if (setup_opts_from_req(sk, req) == -1) {
pr_perror("Arguments treating fail");
@@ -175,7 +178,7 @@ static int dump_using_req(int sk, CriuOpts *req)
if (cr_dump_tasks(req->pid) == -1)
goto exit;
- if (req->has_leave_running && req->leave_running) {
+ if (req->leave_running || !self_dump) {
success = true;
exit:
if (send_criu_dump_resp(sk, success, false) == -1) {
--
1.8.1.2
More information about the CRIU
mailing list