[CRIU] [PATCH 4/5] files: Call for tty migration helpers in
prepare_fds
Cyrill Gorcunov
gorcunov at openvz.org
Thu Sep 27 08:17:41 EDT 2012
When we start restoring file descriptors we might may
still need some standart streams opened for tty migration,
so call for appropriate tty layer helpers here.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
files.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/files.c b/files.c
index 8c01f68..d49ba18 100644
--- a/files.c
+++ b/files.c
@@ -518,9 +518,13 @@ int prepare_fds(struct pstree_item *me)
u32 ret;
int state;
+ ret = tty_prep_fds();
+ if (ret)
+ goto err;
+
ret = close_old_fds(me);
if (ret)
- return ret;
+ goto err;
pr_info("Opening fdinfo-s\n");
@@ -547,6 +551,8 @@ int prepare_fds(struct pstree_item *me)
break;
}
+err:
+ tty_fini_fds();
return ret;
}
--
1.7.7.6
More information about the CRIU
mailing list