conf: don't send ttys when none are configured

parent 36259ede
...@@ -3072,6 +3072,9 @@ static int lxc_send_ttys_to_parent(struct lxc_handler *handler) ...@@ -3072,6 +3072,9 @@ static int lxc_send_ttys_to_parent(struct lxc_handler *handler)
int sock = handler->data_sock[0]; int sock = handler->data_sock[0];
int ret = -1; int ret = -1;
if (!conf->tty)
return 0;
for (i = 0; i < conf->tty; i++) { for (i = 0; i < conf->tty; i++) {
int ttyfds[2]; int ttyfds[2];
struct lxc_pty_info *pty_info = &tty_info->pty_info[i]; struct lxc_pty_info *pty_info = &tty_info->pty_info[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment