From: Christian Brauner Date: Mon, 4 Sep 2017 12:35:02 +0000 (+0200) Subject: conf: don't send ttys when none are configured X-Git-Tag: lxc-2.1.0~8^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f9bbd230c774570826c96101b9382802d809caf;p=thirdparty%2Flxc.git conf: don't send ttys when none are configured Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index f5922377b..4e304830e 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3072,6 +3072,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];