Commit 1e98f53c authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Cyrill Gorcunov

dump: Stop scanning at once if list is empty

Empty list on scan error means, that the very top task ran away from
us. There's no point in trying to catch one.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent ae9f1bfd
......@@ -1036,6 +1036,12 @@ static int collect_pstree(pid_t pid, struct list_head *pstree_list,
break;
}
if (list_empty(pstree_list))
/*
* No items at all -- no need in re-scanning it again
*/
break;
/*
* Old tasks can die and new ones can appear while we
* try to seize the swarm. It's much simpler (and reliable)
......
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