[CRIU] [PATCH] pstree: Update max_pid with thread ids
Andrew Vagin
avagin at parallels.com
Wed Oct 29 05:41:12 PDT 2014
Signed-off-by: Andrew Vagin <avagin at parallels.com>
On Wed, Oct 29, 2014 at 03:28:12PM +0400, Pavel Emelyanov wrote:
> When creating helpers, we need to make sure their
> PIDs do not intersect with threads' IDs.
>
> Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
>
> ---
>
> diff --git a/pstree.c b/pstree.c
> index 5ea4283..a75d17a 100644
> --- a/pstree.c
> +++ b/pstree.c
> @@ -415,6 +415,7 @@ static int read_pstree_image(void)
> for (i = 0; i < e->n_threads; i++) {
> pi->threads[i].real = -1;
> pi->threads[i].virt = e->threads[i];
> + max_pid = max((int)e->threads[i], max_pid);
> }
>
> task_entries->nr_threads += e->n_threads;
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list