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
This commit is contained in:
KLuka 2015-03-11 16:21:15 +01:00
parent 2f2d6ffabf
commit cca02b1fee

View file

@ -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.