diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index d0ccfe982..2e7f68c05 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -9724,9 +9724,9 @@ static const struct builtincmd builtintab[] = { | |||
9724 | { BUILTIN_SPEC_REG ":" , truecmd }, | 9724 | { BUILTIN_SPEC_REG ":" , truecmd }, |
9725 | #if ENABLE_ASH_BUILTIN_TEST | 9725 | #if ENABLE_ASH_BUILTIN_TEST |
9726 | { BUILTIN_REGULAR "[" , testcmd }, | 9726 | { BUILTIN_REGULAR "[" , testcmd }, |
9727 | #if ENABLE_ASH_BASH_COMPAT | 9727 | # if ENABLE_ASH_BASH_COMPAT |
9728 | { BUILTIN_REGULAR "[[" , testcmd }, | 9728 | { BUILTIN_REGULAR "[[" , testcmd }, |
9729 | #endif | 9729 | # endif |
9730 | #endif | 9730 | #endif |
9731 | #if ENABLE_ASH_ALIAS | 9731 | #if ENABLE_ASH_ALIAS |
9732 | { BUILTIN_REG_ASSG "alias" , aliascmd }, | 9732 | { BUILTIN_REG_ASSG "alias" , aliascmd }, |
@@ -10334,13 +10334,16 @@ preadfd(void) | |||
10334 | reinit_unicode_for_ash(); | 10334 | reinit_unicode_for_ash(); |
10335 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout); | 10335 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout); |
10336 | if (nr == 0) { | 10336 | if (nr == 0) { |
10337 | /* Ctrl+C pressed */ | 10337 | /* ^C pressed, "convert" to SIGINT */ |
10338 | write(STDOUT_FILENO, "^C", 2); | ||
10338 | if (trap[SIGINT]) { | 10339 | if (trap[SIGINT]) { |
10339 | buf[0] = '\n'; | 10340 | buf[0] = '\n'; |
10340 | buf[1] = '\0'; | 10341 | buf[1] = '\0'; |
10341 | raise(SIGINT); | 10342 | raise(SIGINT); |
10342 | return 1; | 10343 | return 1; |
10343 | } | 10344 | } |
10345 | exitstatus = 128 + SIGINT; | ||
10346 | bb_putchar('\n'); | ||
10344 | goto retry; | 10347 | goto retry; |
10345 | } | 10348 | } |
10346 | if (nr < 0) { | 10349 | if (nr < 0) { |