The ps.c change allows us to start. The interestingtimes.c change allows us to clean up properly afterwards if you ^C out (which you usually do).
Tested with both ssh and "adb shell" (the latter being where I noticed the problem). --- lib/interestingtimes.c | 2 +- toys/posix/ps.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
From 2964f69cfd9f4c2ab6b6df6dba55207f9d7ed975 Mon Sep 17 00:00:00 2001 From: Elliott Hughes <[email protected]> Date: Fri, 15 Apr 2016 18:48:12 -0700 Subject: [PATCH] Fix "ssh top". The ps.c change allows us to start. The interestingtimes.c change allows us to clean up properly afterwards if you ^C out (which you usually do). Tested with both ssh and "adb shell" (the latter being where I noticed the problem). --- lib/interestingtimes.c | 2 +- toys/posix/ps.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/interestingtimes.c b/lib/interestingtimes.c index c4ea2c2..8337ce8 100644 --- a/lib/interestingtimes.c +++ b/lib/interestingtimes.c @@ -227,7 +227,7 @@ void tty_jump(int x, int y) void tty_reset(void) { - set_terminal(1, 0, 0); + set_terminal(0, 0, 0); tty_esc("?25h"); tty_esc("0m"); tty_jump(0, 999); diff --git a/toys/posix/ps.c b/toys/posix/ps.c index a1e1981..5235a64 100644 --- a/toys/posix/ps.c +++ b/toys/posix/ps.c @@ -1417,7 +1417,7 @@ static void top_setup(char *defo, char *defk) TT.top.d *= 1000; if (toys.optflags&FLAG_b) TT.width = TT.height = 99999; else { - xset_terminal(0, 1, 0); + set_terminal(0, 1, 0); sigatexit(tty_sigreset); xsignal(SIGWINCH, generic_signal); printf("\033[?25l\033[0m"); -- 2.8.0.rc3.226.g39d4020
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
