[CRIU] Re: [PATCH 2/3] restore: Don't close LAST_PID_PATH descriptor if it was not opened

Stanislav Kinsbursky skinsbursky at parallels.com
Mon Mar 12 06:18:26 EDT 2012


12.03.2012 12:23, Cyrill Gorcunov пишет:
> On Mon, Mar 12, 2012 at 12:14:21PM +0400, Stanislav Kinsbursky wrote:
> ...
>>>>>
>>>>> -	snprintf(buf, sizeof(buf), "%d", pid - 1);
>>>>> -	ca.pid = pid;
>>>>> -	ca.clone_flags = ns_clone_flags;
>>>>> -	ca.fd = open(LAST_PID_PATH, O_RDWR);
>>>>> +	ca.pid		= pid;
>>>>> +	ca.clone_flags	= ns_clone_flags;
>>>>> +	ca.fd		= open(LAST_PID_PATH, O_RDWR);
>>>>
>>>> In general I don't appreciate such style of assignments.
>>>
>>> Sure I'll not toss this lines in new version, but in general
>>> I think this style of assignment a way more convenient to
>>> read and parse by eyes. So if you don't mind I'll continue
>>> using it (if there is strong disagreement -- then sure I'll
>>> stop using this style).
>>>
>>
>>  From my POW the problem here is not in the style you are trying to
>> invent, but in the attention you are paying to such things.
>> I believe that these style efforts are minor - especially comparing
>> to other pending tasks in "TODO" list.
>> IOW, energy, spent on code cleaning, have to be balanced with the
>> energy, spend on the project development. The project is still to
>> raw to clean it all the time just for cleanness itself.
>> This is just my opinion. And I'm sorry, if it's offensive.
>
> Oh, common Stas, do you really think I sit day/night just to
> clean code up? And yes, I believe having some clean code is
> a way more important than "lets finish all the todo things,
> we will clean it later". No, we don't. There always be tasks
> to implement, there always be bugs to fix. But the shite which
> comes into the code almost for sure will live there only because
> "we have tasks in todo". Hell no I buy it. Sorry if it was offensive ;)
>

No, it was not. :)
And it's not my project. ;)

-- 
Best regards,
Stanislav Kinsbursky



More information about the CRIU mailing list