Commit 2169020b authored by Pavel Emelyanov's avatar Pavel Emelyanov

dump: Add comment saying why we dump zombies separately from alive tasks

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ca3a23ec
...@@ -1242,6 +1242,12 @@ static int dump_zombies(void) ...@@ -1242,6 +1242,12 @@ static int dump_zombies(void)
if (pidns && set_proc_fd(pidns_proc)) if (pidns && set_proc_fd(pidns_proc))
return -1; return -1;
/*
* We dump zombies separately becase for pid-ns case
* we'd have to resolve their pids w/o parasite via
* target ns' proc.
*/
for_each_pstree_item(item) { for_each_pstree_item(item) {
if (item->state != TASK_DEAD) if (item->state != TASK_DEAD)
continue; continue;
...@@ -1370,6 +1376,9 @@ static int dump_one_task(struct pstree_item *item) ...@@ -1370,6 +1376,9 @@ static int dump_one_task(struct pstree_item *item)
} }
if (item->state == TASK_DEAD) if (item->state == TASK_DEAD)
/*
* zombies are dumped separately in dump_zombies()
*/
return 0; return 0;
dfds = xmalloc(sizeof(*dfds)); dfds = xmalloc(sizeof(*dfds));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment