[CRIU] [PATCH v4 05/41] cr-restore: Open transport socket earlier

Kirill Tkhai ktkhai at virtuozzo.com
Thu May 4 16:47:18 PDT 2017


От: Andrey Vagin
Отправлено: 5 мая 2017 г. 0:32
Кому: Kirill Tkhai
Копия: criu at openvz.org; Pavel Tikhomirov; Pavel Emelianov
Тема: Re: [PATCH v4 05/41] cr-restore: Open transport socket earlier

>> --- a/criu/pstree.c
>> +++ b/criu/pstree.c
>> @@ -258,7 +258,7 @@ struct pstree_item *__alloc_pstree_item(bool rst, int level)
>>  void init_pstree_helper(struct pstree_item *ret)
>>  {
>>        ret->pid->state = TASK_HELPER;
>> -     rsti(ret)->clone_flags = CLONE_FILES | CLONE_FS;
>> +     rsti(ret)->clone_flags = 0;

>Why do we need this ^^^

It's need because helper tasks want to have transport sockets too.
But a helper has a transport socket, it must have either
1) its own files (i.e., when there is no CLONE_FS),
2) or prepare_fds() in restore_one_task() to resolve shared fdt
with other tasks.

Here is the first way. If you want the second way, see the attached
file (it may be split in two or three patches).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20170504/676fc035/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 4956 bytes
Desc: patch.diff
URL: <http://lists.openvz.org/pipermail/criu/attachments/20170504/676fc035/attachment.bin>


More information about the CRIU mailing list