mirror of
https://github.com/rfivet/uemacs.git
synced 2025-07-26 11:24:26 -04: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. */
|
movecursor(term.t_nrow, 0); /* Seek to last line. */
|
||||||
TTflush();
|
TTflush();
|
||||||
TTclose(); /* stty to old settings */
|
TTclose(); /* stty to old settings */
|
||||||
|
TTkclose(); /* Close "keyboard" */
|
||||||
if ((cp = getenv("SHELL")) != NULL && *cp != '\0')
|
if ((cp = getenv("SHELL")) != NULL && *cp != '\0')
|
||||||
system(cp);
|
system(cp);
|
||||||
else
|
else
|
||||||
@ -241,6 +242,7 @@ int execprg(int f, int n)
|
|||||||
TTputc('\n'); /* Already have '\r' */
|
TTputc('\n'); /* Already have '\r' */
|
||||||
TTflush();
|
TTflush();
|
||||||
TTclose(); /* stty to old modes */
|
TTclose(); /* stty to old modes */
|
||||||
|
TTkclose();
|
||||||
system(line);
|
system(line);
|
||||||
fflush(stdout); /* to be sure P.K. */
|
fflush(stdout); /* to be sure P.K. */
|
||||||
TTopen();
|
TTopen();
|
||||||
@ -341,10 +343,12 @@ int pipecmd(int f, int n)
|
|||||||
#if V7 | USG | BSD
|
#if V7 | USG | BSD
|
||||||
TTflush();
|
TTflush();
|
||||||
TTclose(); /* stty to old modes */
|
TTclose(); /* stty to old modes */
|
||||||
|
TTkclose();
|
||||||
strcat(line, ">");
|
strcat(line, ">");
|
||||||
strcat(line, filnam);
|
strcat(line, filnam);
|
||||||
system(line);
|
system(line);
|
||||||
TTopen();
|
TTopen();
|
||||||
|
TTkopen();
|
||||||
TTflush();
|
TTflush();
|
||||||
sgarbf = TRUE;
|
sgarbf = TRUE;
|
||||||
s = TRUE;
|
s = TRUE;
|
||||||
@ -430,9 +434,11 @@ int filter_buffer(int f, int n)
|
|||||||
TTputc('\n'); /* Already have '\r' */
|
TTputc('\n'); /* Already have '\r' */
|
||||||
TTflush();
|
TTflush();
|
||||||
TTclose(); /* stty to old modes */
|
TTclose(); /* stty to old modes */
|
||||||
|
TTkclose();
|
||||||
strcat(line, " <fltinp >fltout");
|
strcat(line, " <fltinp >fltout");
|
||||||
system(line);
|
system(line);
|
||||||
TTopen();
|
TTopen();
|
||||||
|
TTkopen();
|
||||||
TTflush();
|
TTflush();
|
||||||
sgarbf = TRUE;
|
sgarbf = TRUE;
|
||||||
s = TRUE;
|
s = TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user