From 0a36f41aacdf33a40cda19fcc13a8847719768bf Mon Sep 17 00:00:00 2001 From: Joseph Gooch Date: Tue, 15 Sep 2020 17:56:06 +0000 Subject: [PATCH] Temp comment out new condition - to be removed if it fixes CRI-O Signed-off-by: Joseph Gooch --- src/conn_sock.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/conn_sock.c b/src/conn_sock.c index c909c3ec..c8cd1b42 100644 --- a/src/conn_sock.c +++ b/src/conn_sock.c @@ -325,18 +325,19 @@ static gboolean terminate_remote_sock(struct remote_sock_s *sock) { remote_sock_shutdown(sock, SHUT_RD); if (SOCK_IS_CONSOLE(sock->sock_type)) { - if (sock->dest->readers == NULL || sock->dest->readers->len == 0) { - if (*(sock->dest->fd) >= 0 && opt_stdin) { - if (!opt_leave_stdin_open) { - close(*(sock->dest->fd)); - *(sock->dest->fd) = -1; - } else { - ninfo("Not closing input"); - } + // If we're terminating our STDIN holder, we need to close the FD too, based on the cmdline + // if (sock->dest->readers == NULL || sock->dest->readers->len == 0) { + if (*(sock->dest->fd) >= 0 && opt_stdin) { + if (!opt_leave_stdin_open) { + close(*(sock->dest->fd)); + *(sock->dest->fd) = -1; + } else { + ninfo("Not closing input"); } - } else { - ninfo("Not closing input - still have open sockets"); } + //} else { + // ninfo("Not closing input - still have open sockets"); + //} } return G_SOURCE_REMOVE; }