[CRIU] [PATCH cr 6/8] pidns: zombie processes are not supported yet

Andrey Vagin avagin at openvz.org
Wed May 16 04:32:39 EDT 2012


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-dump.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/cr-dump.c b/cr-dump.c
index 25679d6..11f31a0 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -1550,8 +1550,19 @@ static int dump_one_task(struct pstree_item *item)
 	if (ret < 0)
 		goto err;
 
-	if (item->state == TASK_DEAD)
+	if (item->state == TASK_DEAD) {
+		int i;
+		/* FIXME don't support zombie in pid name space*/
+		item->pid.pid = item->pid.real_pid;
+		for (i = 0; i < item->parent->nr_children; i++)
+			if (item->parent->children[i].real_pid == item->pid.real_pid) {
+				item->parent->children[i].pid = item->pid.pid;
+				break;
+			}
+
+		BUG_ON(i == item->parent->nr_children);
 		return dump_one_zombie(item, &pps_buf);
+	}
 
 	ret = collect_mappings(pid, &vma_area_list);
 	if (ret) {
-- 
1.7.1



More information about the CRIU mailing list