mirror of
https://github.com/rfivet/uemacs.git
synced 2024-11-16 09:36:29 -05:00
spawn.c: do the "keyboard open/close" around shell invocations
I'm not 100% sure we really should even be doing this whole "keyboard" open/close for termcap, but even if the right thing to do ends up being to just do everything in the TTopen/TTclose (and make TTkopen/TTkclose no-ops), it does seem to be the right thing to do. Reported-by: Bijan Soleymani <bijan@psq.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
33676d6d23
commit
12ba84c8dd
6
spawn.c
6
spawn.c
@ -78,6 +78,7 @@ int spawncli(int f, int n)
|
||||
movecursor(term.t_nrow, 0); /* Seek to last line. */
|
||||
TTflush();
|
||||
TTclose(); /* stty to old settings */
|
||||
TTkclose(); /* Close "keyboard" */
|
||||
if ((cp = getenv("SHELL")) != NULL && *cp != '\0')
|
||||
system(cp);
|
||||
else
|
||||
@ -241,6 +242,7 @@ int execprg(int f, int n)
|
||||
TTputc('\n'); /* Already have '\r' */
|
||||
TTflush();
|
||||
TTclose(); /* stty to old modes */
|
||||
TTkclose();
|
||||
system(line);
|
||||
fflush(stdout); /* to be sure P.K. */
|
||||
TTopen();
|
||||
@ -341,10 +343,12 @@ int pipecmd(int f, int n)
|
||||
#if V7 | USG | BSD
|
||||
TTflush();
|
||||
TTclose(); /* stty to old modes */
|
||||
TTkclose();
|
||||
strcat(line, ">");
|
||||
strcat(line, filnam);
|
||||
system(line);
|
||||
TTopen();
|
||||
TTkopen();
|
||||
TTflush();
|
||||
sgarbf = TRUE;
|
||||
s = TRUE;
|
||||
@ -430,9 +434,11 @@ int filter_buffer(int f, int n)
|
||||
TTputc('\n'); /* Already have '\r' */
|
||||
TTflush();
|
||||
TTclose(); /* stty to old modes */
|
||||
TTkclose();
|
||||
strcat(line, " <fltinp >fltout");
|
||||
system(line);
|
||||
TTopen();
|
||||
TTkopen();
|
||||
TTflush();
|
||||
sgarbf = TRUE;
|
||||
s = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user