[prev in list] [next in list] [prev in thread] [next in thread]
List: openvz-criu
Subject: [CRIU] [PATCH 13/14] restore: collect signals from zombies (v2)
From: xemul () parallels ! com (Pavel Emelyanov)
Date: 2013-01-25 11:06:16
Message-ID: 51026728.5060106 () parallels ! com
[Download RAW message or body]
On 01/18/2013 04:20 PM, Andrew Vagin wrote:
> On Fri, Jan 18, 2013 at 02:36:36PM +0400, Pavel Emelyanov wrote:
>>> +
>>> + for_each_pstree_item(pi) {
>>> + if (pi->state == TASK_HELPER)
>>> + continue;
>>> + ret = (int) futex_get(&task_entries->nr_in_progress);
>>> + if (ret < 0)
>>> + goto out;
>>> + futex_set_and_wake(&task_entries->pid, pi->pid.virt);
>>> + pr_info("Wait %d\n", pi->pid.virt);
>>> + futex_wait_while(&task_entries->nr_in_progress, ret);
>>> + }
>>> +
>>
>>> @@ -749,6 +755,10 @@ long __export_restore_task(struct task_restore_core_args *args)
>>> act.rt_sa_restorer = cr_restore_rt;
>>> sys_sigaction(SIGCHLD, &act, NULL, sizeof(rt_sigset_t));
>>>
>>> + restore_finish_stage(CR_STATE_RESTORE_PREP_ZOMBIES);
>>> + futex_wait_until(&task_entries->pid, my_pid);
>>> + restore_finish_stage(CR_STATE_RESTORE_ZOMBIES);
>>
>> Why do we need to serialize the alive tasks restoration?
>
> Alive tasks handles SIGCHLD in sigzombie_handler.
> crtools doesn't know who is alive and who is not alive.
I don't like this. Let's orchestrate restoration of zombies only.
>>
>>> +
>>> sys_sigaction(SIGCHLD, &args->sigchld_act, NULL, sizeof(rt_sigset_t));
>>>
>>> ret = restore_signals(args->siginfo, args->siginfo_nr, 1);
>>>
>>
>>
> .
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic