diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-25 16:01:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-25 16:01:28 -0700 |
commit | 12ba84c8dd6173b710e14d735e1576f09e7c9825 (patch) | |
tree | f5fd4368c4747d946dd6e537971e1d01cc1b688d | |
parent | 33676d6d23f1381a7984dd1b1fd4f1464317e6aa (diff) | |
download | uemacs-12ba84c8dd6173b710e14d735e1576f09e7c9825.tar.gz |
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>
-rw-r--r-- | spawn.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |