[Devel] [PATCH] dump: any non-negative return code of run_scripts means an error

Andrey Vagin avagin at openvz.org
Thu Apr 6 12:46:06 PDT 2017


From: Andrei Vagin <avagin at virtuozzo.com>

run_scripts can execute notifications via rpc, so WEXITSTATUS()
can't be applied to return codes in this case.

And an action script can be killed and it is an error too.

This patch may fix on of errors of
https://jira.sw.ru/browse/PSBM-62583

Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
 criu/cr-dump.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index e0d66aa..6998988 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -1877,10 +1877,8 @@ static int cr_dump_finish(int ret)
 		 * checkpoint.
 		 */
 		post_dump_ret = run_scripts(ACT_POST_DUMP);
-		if (post_dump_ret) {
-			post_dump_ret = WEXITSTATUS(post_dump_ret);
-			pr_info("Post dump script passed with %d\n", post_dump_ret);
-		}
+		if (post_dump_ret)
+			pr_err("Post dump script passed with %d\n", post_dump_ret);
 	}
 
 	/*
-- 
1.8.3.1



More information about the Devel mailing list