restore: Call prepare_fds() in restore_one_zombie()

Zombie may be choosen as parent for task helper
during solving pgid dependences. In this situation,
it becomes to share fdt with the helper and it has
to call prepare_fds() to decrement fdt->nr.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Kirill Tkhai 2017-12-28 13:50:45 +03:00 committed by Andrei Vagin
parent 75b46c9d05
commit 7d8c2d86a8

View file

@ -1117,6 +1117,9 @@ static int restore_one_zombie(CoreEntry *core)
pr_info("Restoring zombie with %d code\n", exit_code);
if (prepare_fds(current))
return -1;
if (inherit_fd_fini() < 0)
return -1;