From cca02b1fee277a73051e0af636acc918918a5012 Mon Sep 17 00:00:00 2001 From: KLuka Date: Wed, 11 Mar 2015 16:21:15 +0100 Subject: [PATCH] Issue #52: Emacs refresh is slow When new process is launched default terminal speed is correctly set to 38400. This improves usage of Emacs editor and perhaps some other applications. This is also partial fix for issue #58 --- shellinabox/launcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c index 9bc5541..587fa0e 100644 --- a/shellinabox/launcher.c +++ b/shellinabox/launcher.c @@ -1509,13 +1509,13 @@ static void childProcess(struct Service *service, int width, int height, // Set initial terminal settings struct termios tt = { 0 }; tcgetattr(0, &tt); - cfsetispeed(&tt, 38400); - cfsetospeed(&tt, 38400); tt.c_iflag = TTYDEF_IFLAG & ~ISTRIP; tt.c_oflag = TTYDEF_OFLAG; tt.c_lflag = TTYDEF_LFLAG; tt.c_cflag = (TTYDEF_CFLAG & ~(CS7|PARENB|HUPCL)) | CS8; tt.c_cc[VERASE] = '\x7F'; + cfsetispeed(&tt, B38400); + cfsetospeed(&tt, B38400); tcsetattr(0, TCSAFLUSH, &tt); // Assert root privileges in order to update utmp entry.