Sfoglia il codice sorgente

Hotfix (terminal attributes reset on shutdown)

Ivan Arkhipov 5 anni fa
parent
commit
84511f50c1
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      esh_main_loop.c

+ 2 - 0
esh_main_loop.c

@@ -125,6 +125,7 @@ void EShRunLoop() {
 
 			if (input_char == 4) {
 				// Ctrl + d
+			    tcsetattr(fileno(stdin), TCSANOW, &orig_term_attr);
 				return;
 			}
 
@@ -151,6 +152,7 @@ void EShRunLoop() {
 
 			if (input_char == 3) {
 				// Ctrl + c
+			    tcsetattr(fileno(stdin), TCSANOW, &orig_term_attr);
 				printf("\n");
 				return;
 			}