[CRIU] [PATCH 3/3] crtoools: add support of stopped tasks
Pavel Emelyanov
xemul at parallels.com
Thu Sep 26 09:17:21 EDT 2013
On 09/26/2013 04:39 PM, Andrew Vagin wrote:
> 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.
O'RLY? Even with sys_tkill()? What if I from shell do kill -STOP $(THREAD_PID)?
> .
>
More information about the CRIU
mailing list