[CRIU] [PATCH 05/16] tty: Prepare for no parasite_ctl

Pavel Emelyanov xemul at virtuozzo.com
Thu Jul 6 19:15:54 MSK 2017


SCM-dumping code won't provide the ctl for TTY dump. To
make this work we'll have to peek required tty info from
current (see the SCM patch), but I doubt that anyone
sends TTYs via sockets ... so keep this in TODO list.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/tty.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/criu/tty.c b/criu/tty.c
index f674f25..a967ee3 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -1764,6 +1764,11 @@ static int dump_tty_info(int lfd, u32 id, const struct fd_parms *p, struct tty_d
 
 	int ret = -1;
 
+	if (!p->fd_ctl) {
+		pr_err("No CTL for TTY dump, likely SCM case\n");
+		return -1;
+	}
+
 	/*
 	 * Make sure the structures the system provides us
 	 * correlates well with protobuf templates.
-- 
2.1.4



More information about the CRIU mailing list