From 3ffaab433eaace56264ae93d5448d52f69e16af8 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Mon, 4 Sep 2017 14:35:02 +0200 Subject: [PATCH] conf: don't send ttys when none are configured Signed-off-by: Christian Brauner --- src/lxc/conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 05fb8e54e..041cc3605 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3011,6 +3011,9 @@ static int lxc_send_ttys_to_parent(struct lxc_handler *handler) int sock = handler->data_sock[0]; int ret = -1; + if (!conf->tty) + return 0; + for (i = 0; i < conf->tty; i++) { int ttyfds[2]; struct lxc_pty_info *pty_info = &tty_info->pty_info[i]; -- 2.47.2