aboutsummaryrefslogtreecommitdiff
path: root/shell/shell_common.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-03-06 12:25:39 +0000
committerRon Yorston <rmy@pobox.com>2023-03-06 12:25:39 +0000
commitb50470de96320425adbed82129bdb7f7f5263ddb (patch)
tree129ee385d0d9c658eb7f71717372ea496dd604e1 /shell/shell_common.c
parent8ade494aebe60ea14026d48025a462e6d0b58a7f (diff)
downloadbusybox-w32-b50470de96320425adbed82129bdb7f7f5263ddb.tar.gz
busybox-w32-b50470de96320425adbed82129bdb7f7f5263ddb.tar.bz2
busybox-w32-b50470de96320425adbed82129bdb7f7f5263ddb.zip
win32: virtual terminal input fixes
- Disable ENABLE_PROCESSED_INPUT in raw mode. Otherwise ^C isn't immediately detected during shell command line editing with virtual terminal input enabled. - Switch read_key()/unix_readkey() to windows_read_key()/read_key(). This allows the shell `read` builtin to use windows_read_key(). Without this change `read` fails when virtual terminal input is enabled.
Diffstat (limited to 'shell/shell_common.c')
-rw-r--r--shell/shell_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c
index 9d74dcb7a..efe8828e4 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -223,7 +223,7 @@ shell_builtin_read(struct builtin_read_params *params)
223 if (isatty(fd)) { 223 if (isatty(fd)) {
224 int64_t key; 224 int64_t key;
225 225
226 key = read_key(fd, NULL, timeout); 226 key = windows_read_key(fd, NULL, timeout);
227 if (key == 0x03) { 227 if (key == 0x03) {
228 /* ^C pressed */ 228 /* ^C pressed */
229 retval = (const char *)(uintptr_t)2; 229 retval = (const char *)(uintptr_t)2;