[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH] ash: job: option to restore term io after job is stopped/killed
From: Björn_Bidar <bjorn.bidar () jolla ! com>
Date: 2020-10-30 13:19:32
Message-ID: 3457847.hfoT483aqq () odin
[Download RAW message or body]
This moves the restore IOS support into a build option so it can be
disabled/enabled. Using this fixes lost terminal stdout after using ^C
on programs like /bin/su.
Signed-off-by: Bj=F6rn Bidar <bjorn.bidar@jolla.com>
---
shell/ash.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/shell/ash.c b/shell/ash.c
index ecb9b132b..97bf55994 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -77,6 +77,14 @@
//config: default y
//config: depends on SHELL_ASH
//config:
+//config:config ASH_JOB_RESTORE_TERM_IOS
+//config: bool "Restore termio"
+//config: default y
+//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH
+//config: help
+//config: Restore IO after foreground job received SIGINT/SIGKILL/SIGSTO=
P.
+//config: Avoids lost STDOUT after programs like su recieves ^C.
+//config:
//config:config ASH_ALIAS
//config: bool "Alias support"
//config: default y
@@ -3796,7 +3804,7 @@ static unsigned njobs; //4
/* current job */
static struct job *curjob; //lots
=
-#if 0
+#if ENABLE_ASH_JOB_RESTORE_TERM_IOS
/* Bash has a feature: it restores termios after a successful wait for
* a foreground job which had at least one stopped or sigkilled member.
* The probable rationale is that SIGSTOP and SIGKILL can preclude task fr=
om
-- =
2.29.1
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic