summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-01-18 08:49:21 +0000
committerRon Yorston <rmy@pobox.com>2021-01-18 08:49:21 +0000
commit12e14ebba6b6fe111829cac357b48154e769d778 (patch)
tree2d6ce70e071e0fde33712fecd1ab8026989412c0
parent89963b524d211e1aec12b72b3725be05ee95c8cf (diff)
downloadbusybox-w32-FRP-3812-g12e14ebba.tar.gz
busybox-w32-FRP-3812-g12e14ebba.tar.bz2
busybox-w32-FRP-3812-g12e14ebba.zip
ash: alter handling of interactive ^CFRP-3812-g12e14ebba
Upstream commit 4ac35a30d (ash: make interactive ^C break out of PS2 mode) doesn't work for WIN32. It causes the shell to exit when ^C is pressed on the command line. Call raise_interrupt() instead of raise(SIGINT).
-rw-r--r--shell/ash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 780900b40..b9bdd64e5 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11388,9 +11388,11 @@ preadfd(void)
11388 nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ); 11388 nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ);
11389 if (nr == 0) { 11389 if (nr == 0) {
11390 /* ^C pressed, "convert" to SIGINT */ 11390 /* ^C pressed, "convert" to SIGINT */
11391 write(STDOUT_FILENO, "^C", 2);
11392# if !ENABLE_PLATFORM_MINGW32 11391# if !ENABLE_PLATFORM_MINGW32
11392 write(STDOUT_FILENO, "^C", 2);
11393 raise(SIGINT); 11393 raise(SIGINT);
11394# else
11395 raise_interrupt();
11394# endif 11396# endif
11395 if (trap[SIGINT]) { 11397 if (trap[SIGINT]) {
11396 buf[0] = '\n'; 11398 buf[0] = '\n';