[CRIU] [PATCH 28/32] tools: cpt2 -- Add writing of pstree entries
Pavel Emelyanov
xemul at parallels.com
Mon Apr 1 06:29:23 EDT 2013
On 03/31/2013 01:43 AM, Cyrill Gorcunov wrote:
>
> This just walks over process tree and write entries to criu image.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> tools/cpt2/src/convert.c | 6 +++++
> tools/cpt2/src/include/task.h | 1 +
> tools/cpt2/src/task.c | 62 +++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 69 insertions(+)
>
> + list_for_each_entry(task, &task_list, list) {
> + ret = write_pstree_item(pstree_fd, task, &e,
> + threads, max_threads);
> + if (ret)
> + goto out;
> + list_for_each_entry(child, &task->children, list) {
> + ret = write_pstree_item(pstree_fd, child,
> + &e, threads, max_threads);
> + if (ret)
> + goto out;
> + }
> + }
Does task_list contain all tasks? In that case we'll write some tasks twice.
Does it contain only even-levels of tasks? O_O
More information about the CRIU
mailing list