Commit 70d9780d authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

restore: call close_old_fds() after mounting /proc

A process can be restored in a new pidns. close_old_fds() opens
the /proc/PID directory. Without this patch we can see errors like this:
(00.333915)      1: Error (util.c:102): Unable to close fd 6: Bad file descriptor
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8d87596e
......@@ -1246,9 +1246,6 @@ static int restore_task_with_children(void *_arg)
if (restore_finish_stage(CR_STATE_RESTORE_NS) < 0)
exit(1);
if (close_old_fds(current))
exit(1);
if (collect_mount_info(getpid()))
exit(1);
......@@ -1263,6 +1260,9 @@ static int restore_task_with_children(void *_arg)
if (mount_proc())
exit(1);
if (close_old_fds(current))
exit(1);
if (root_prepare_shared())
exit(1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment