[CRIU] [PATCH] collect: Properly report tasks collecting error

Pavel Emelyanov xemul at parallels.com
Tue Mar 26 13:08:07 EDT 2013


When we've failed to seize tasks we should report this error to the caller.

Reported-by: Kevin Wilson <wkevils at gmail.com>
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>

---

diff --git a/cr-dump.c b/cr-dump.c
index 4c3d064..cf5cdb5 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -1013,8 +1013,10 @@ static int collect_pstree(pid_t pid, const struct cr_options *opts)
 		 * rather than trying to chase them.
 		 */
 try_again:
-		if (attempts == 0)
-			break;
+		if (attempts == 0) {
+			pr_err("Can't freeze the tree\n");
+			return -1;
+		}
 
 		attempts--;
 		pr_info("Trying to suspend tasks again\n");


More information about the CRIU mailing list