[CRIU] [PATCH v4 20/31] proc: Close CR_PROC_FD_OFF and TRANSPORT_FD_OFF later
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Feb 22 03:33:29 PST 2017
CR_PROC_FD_OFF is need for accessing to foreign tasks
fds, and will be used in the future.
TRANSPORT_FD_OFF is for uniformity.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
criu/cr-restore.c | 2 ++
criu/files.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 6933cf42c..d0f567fba 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -3255,6 +3255,8 @@ static int sigreturn_restore(pid_t pid, struct task_restore_args *task_args, uns
close_image_dir();
close_proc();
+ close_service_fd(TRANSPORT_FD_OFF);
+ close_service_fd(CR_PROC_FD_OFF);
close_service_fd(ROOT_FD_OFF);
close_service_fd(USERNSD_SK);
close_service_fd(FDSTORE_SK_OFF);
diff --git a/criu/files.c b/criu/files.c
index 324115b1a..d68c7057b 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -1203,7 +1203,6 @@ int prepare_fds(struct pstree_item *me)
if (rsti(me)->fdt)
futex_inc_and_wake(&rsti(me)->fdt->fdt_lock);
out:
- close_service_fd(CR_PROC_FD_OFF);
tty_fini_fds();
return ret;
}
More information about the CRIU
mailing list