[CRIU] [PATCH 3/9] cr-restore: set cr_error to EEXIST if such pid already exists, v3

Pavel Emelyanov xemul at parallels.com
Fri Dec 19 08:49:36 PST 2014


On 12/19/2014 07:39 PM, Ruslan Kuprieiev wrote:
> Why do we even need them there?

Because it's errno management.

> This macros contain restore-specific task_entries and
> i don't think they should be in cr-errno.h.
> 
> 19.12.2014 18:01, Pavel Emelyanov пишет:
>>
>>> @@ -855,6 +858,9 @@ static inline int sig_fatal(int sig)
>>>   struct task_entries *task_entries;
>>>   static unsigned long task_entries_pos;
>>>
>>> +#define set_task_cr_err(new_err)	atomic_cmpxchg(&task_entries->cr_err, 0, new_err)
>>> +#define get_task_cr_err()		atomic_read(&task_entries->cr_err)
>>> +
>>
>> Can you prepare an incremental patch moving this code into errno header?
>>
>>>   static int restore_one_zombie(int pid, CoreEntry *core)
>>>   {
>>>   	int exit_code = core->tc->exit_code;
>>
> .
> 



More information about the CRIU mailing list