From 847e585f68431b58a94987f4f719b99abc634860 Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Wed, 10 Jan 2018 17:00:32 +0300 Subject: [PATCH] core: Init fdstore even earlier Next patch will move SELF_STDIN_OFF sfd to fdstore. This patch moves fdstore_init() before tty_prep_fds(). v4: New Signed-off-by: Kirill Tkhai --- criu/cr-restore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/criu/cr-restore.c b/criu/cr-restore.c index 7545572dc..f9889099f 100644 --- a/criu/cr-restore.c +++ b/criu/cr-restore.c @@ -2204,9 +2204,6 @@ static int restore_root_task(struct pstree_item *init) if (prepare_userns_hook()) return -1; - if (fdstore_init()) - return -1; - if (prepare_namespace_before_tasks()) return -1; @@ -2533,6 +2530,9 @@ int cr_restore_tasks(void) if (prepare_pstree() < 0) goto err; + if (fdstore_init()) + goto err; + if (crtools_prepare_shared() < 0) goto err;