[lxc-devel] [PATCH] Skip control tty code for non-ttys
Stéphane Graber
stgraber at ubuntu.com
Tue Mar 17 01:54:57 UTC 2015
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
src/lxc/attach.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/attach.c b/src/lxc/attach.c
index faa90fc..69dafd4 100644
--- a/src/lxc/attach.c
+++ b/src/lxc/attach.c
@@ -985,7 +985,7 @@ static int attach_child_main(void* data)
new_gid = options->gid;
/* setup the control tty */
- if (options->stdin_fd) {
+ if (options->stdin_fd && isatty(options->stdin_fd)) {
if (setsid() < 0) {
SYSERROR("unable to setsid");
shutdown(ipc_socket, SHUT_RDWR);
--
1.9.1
More information about the lxc-devel
mailing list