[CRIU] [PATCH 2/4] restore: Call prepare_fds() in restore_one_zombie()

Kirill Tkhai ktkhai at virtuozzo.com
Thu Dec 28 12:35:39 MSK 2017


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 at virtuozzo.com>
---
 criu/cr-restore.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index de14a716b..5bebc3d61 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -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;
 



More information about the CRIU mailing list