[CRIU] [PATCH 2/5] service: set one exit point

Pavel Emelyanov xemul at parallels.com
Mon Sep 23 06:52:32 EDT 2013


On 09/20/2013 11:16 PM, Andrew Vagin wrote:

>>> @@ -290,5 +290,10 @@ int cr_service(bool daemon_mode)
>>>  		}
>>>  	}
>>> -	return 0;
>>> +err:
>>> +	close_safe(&server_fd);
>>> +
>>> +	exit(1);
>>> +
>>> +	return -1;
>>
>> Why do we need both exit and return?
>> Will not exit() terminate the process?
> 
> exit() terminates the process, but this function must return anything.
> 
> We can remove this exit().

We shouldn't introduce it, in the first place. Plz, rework the patch.

> Can you check that this series breaks nothing?
> 
> Thanks
> 
>>
>>>  }
>>
> .
> 




More information about the CRIU mailing list