[lxc-devel] [lxd/master] exec: don't s/\\n/\\r\\n/g when interactive

tych0 on Github lxc-bot at linuxcontainers.org
Thu Feb 25 16:26:39 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 387 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160225/cb40bce0/attachment.bin>
-------------- next part --------------
From 17d3dcf7404f9e6f5bc2702193cb8cac1153ed9e Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.andersen at canonical.com>
Date: Thu, 25 Feb 2016 09:22:30 -0700
Subject: [PATCH] exec: don't s/\\n/\\r\\n/g when interactive

Closes #1652 (again :)

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 shared/util_linux.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/shared/util_linux.go b/shared/util_linux.go
index d9e7bc1..279d67c 100644
--- a/shared/util_linux.go
+++ b/shared/util_linux.go
@@ -59,6 +59,8 @@ void configure_pty(int fd) {
 
 	term_settings.c_cflag |= HUPCL;
 
+	term_settings.c_oflag &= ~ONLCR;
+
 	if (tcsetattr(fd, TCSANOW, &term_settings) < 0) {
 		fprintf(stderr, "Failed to set settings: %s\n", strerror(errno));
 		return;


More information about the lxc-devel mailing list