[CRIU] [PATCH] service: SIGCHLD handler

Ruslan Kuprieiev kupruser at gmail.com
Wed Oct 30 18:36:32 PDT 2013


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) :)


More information about the CRIU mailing list