[CRIU] [PATCH 3/3] crtoools: add support of stopped tasks

Andrew Vagin avagin at parallels.com
Thu Sep 26 08:39:14 EDT 2013


On Thu, Sep 26, 2013 at 04:10:01PM +0400, Pavel Emelyanov wrote:
> On 09/26/2013 02:37 PM, Andrey Vagin wrote:
> > @@ -909,8 +910,17 @@ static inline int fork_with_pid(struct pstree_item *item)
> >  
> >  		item->state = ca.core->tc->task_state;
> >  
> > -		if (item->state == TASK_DEAD)
> > +		switch (item->state) {
> > +		case TASK_ALIVE:
> > +		case TASK_STOPPED:
> > +			break;
> > +		case TASK_DEAD:
> >  			item->parent->rst->nr_zombies++;
> > +			break;
> > +		default:
> > +			pr_err("Unknown task state %d\n", item->state);
> > +			return -1;
> > +		}
> >  	} else
> >  		ca.core = NULL;
> >  
> > @@ -1389,7 +1399,8 @@ static void finalize_restore(int status)
> >  
> >  		xfree(ctl);
> >  
> > -		/* TODO restore the process state */
> 
> Will it work with stopped threads?

A thread can't be stopped separatly.



More information about the CRIU mailing list