[CRIU] [PATCH 2/7] parasite: Rework init to be able to handle per-threads data
Pavel Emelyanov
xemul at parallels.com
Tue Nov 6 04:35:13 EST 2012
On 11/06/2012 01:04 PM, Cyrill Gorcunov wrote:
> On Tue, Nov 06, 2012 at 01:01:59PM +0400, Pavel Emelyanov wrote:
>>> static int fini(void)
>>> {
>>> - if (reset_blocked == 1)
>>> - sys_sigprocmask(SIG_SETMASK, &old_blocked, NULL, sizeof(k_rtsigset_t));
>>> + int ret = 0, i;
>>> +
>>> + for (i = 0; i < nr_tid_state; i++) {
>>> + if (tid_state[i].use_sig_blocked) {
>>> + ret |= sys_sigprocmask(SIG_SETMASK, &tid_state[i].sig_blocked,
>>> + NULL, sizeof(k_rtsigset_t));
>>> + }
>>
>> WTF is that???
>
> We need to restore original mask once parasite is fini'ting, of course
> for all threads which we have.
And why doing this in the context of one of them is correct?
More information about the CRIU
mailing list