[CRIU] [PATCH 1/6] dump: don't restore a state of threads

Cyrill Gorcunov gorcunov at gmail.com
Thu Dec 19 05:03:17 PST 2013


On Thu, Dec 19, 2013 at 04:59:41PM +0400, Andrey Vagin wrote:
> @@ -785,8 +785,10 @@ static void unseize_task_and_threads(const struct pstree_item *item, int st)
>  {
>  	int i;
>  
> -	for (i = 0; i < item->nr_threads; i++)
> -		unseize_task(item->threads[i].real, st); /* item->pid will be here */
> +	unseize_task(item->pid.real, st); /* item->pid will be here */
> +
> +	for (i = 1; i < item->nr_threads; i++)
> +		ptrace(PTRACE_DETACH, item->threads[i].real, NULL, NULL);
>  }

So it walks over the threads only (i = 1), is it intentional?


More information about the CRIU mailing list