[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openvz-criu
Subject:    [CRIU] [PATCH] service: SIGCHLD handler
From:       kupruser () gmail ! com (Ruslan Kuprieiev)
Date:       2013-10-31 18:34:08
Message-ID: 5272A2A0.507 () gmail ! com
[Download RAW message or body]

On 31.10.2013 05:36, Ruslan Kuprieiev wrote:
> On 31.10.2013 01:23, Andrew Vagin wrote:
>> On Thu, Oct 31, 2013 at 04:51:47AM +0400, Ruslan Kuprieiev wrote:
>>>>> @@ -323,16 +368,31 @@ int cr_service(bool daemon_mode)
>>>>>           }
>>>>>       }
>>>>> -    /* FIXME Do not ignore children's return values */
>>>>> -    signal(SIGCHLD, SIG_IGN);
>>>>> +    /* Set SIGCHLD handler */
>>>>> +    sigemptyset(&block_mask);
>>>>> +
>>>>> +    sigaddset(&block_mask, SIGCHLD);
>>>>> +
>>>>> +    /* FIXME May need to block some other signals too */
>>>> I think we don't need to block only SIGCHLD.
>>> If we will not block SIGCHLD, it may be received during treating the
>>> status by handler.
>>> In v2 patch, still block SIGCHLD, but handler works until there is
>>> no children that have changed their status.
>>>
>> Of course I wanted to say that we need to block only SIGCHLD;)
> Oh, I thought it wouldn't be nice, if someone will interrupt handler, 
> when it will be writing to logfile, so I add more signals to mask(see 
> patchv2) :)

Pavel, what about this patch?

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic