diff options
author | Ron Yorston <rmy@pobox.com> | 2022-01-13 08:02:41 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-01-13 08:02:41 +0000 |
commit | 4734416a21312488a5099a297907783bee4ccc22 (patch) | |
tree | e42b034f9685a0a07ad080076b757bfba654cf7d /shell | |
parent | b8751bbc9ac24e71fbe1e79c69074b4c87a134d8 (diff) | |
parent | b3eec1651fb02d70716caa355f49320719f74c75 (diff) | |
download | busybox-w32-4734416a21312488a5099a297907783bee4ccc22.tar.gz busybox-w32-4734416a21312488a5099a297907783bee4ccc22.tar.bz2 busybox-w32-4734416a21312488a5099a297907783bee4ccc22.zip |
Merge busybox into merge
Fix merge conflicts in coreutils/ls.c and shell/ash.c.
Update config files to turn off SHA1_HWACCEL. It uses non-portable
assembler.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index 09659c1da..a1d01447a 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -11655,12 +11655,16 @@ preadfd(void) | |||
11655 | line_input_state->path_lookup = pathval(); | 11655 | line_input_state->path_lookup = pathval(); |
11656 | # endif | 11656 | # endif |
11657 | reinit_unicode_for_ash(); | 11657 | reinit_unicode_for_ash(); |
11658 | again: | ||
11658 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ); | 11659 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ); |
11659 | if (nr == 0) { | 11660 | if (nr == 0) { |
11660 | /* ^C pressed, "convert" to SIGINT */ | 11661 | /* ^C pressed, "convert" to SIGINT */ |
11661 | # if !ENABLE_PLATFORM_MINGW32 | 11662 | # if !ENABLE_PLATFORM_MINGW32 |
11662 | write(STDOUT_FILENO, "^C", 2); | 11663 | write(STDOUT_FILENO, "^C", 2); |
11663 | raise(SIGINT); | 11664 | raise(SIGINT); |
11665 | /* raise(SIGINT) did not work! (e.g. if SIGINT | ||
11666 | * is SIG_INGed on startup, it stays SIG_IGNed) | ||
11667 | */ | ||
11664 | # else | 11668 | # else |
11665 | raise_interrupt(); | 11669 | raise_interrupt(); |
11666 | # endif | 11670 | # endif |
@@ -11670,7 +11674,9 @@ preadfd(void) | |||
11670 | return 1; | 11674 | return 1; |
11671 | } | 11675 | } |
11672 | exitstatus = 128 + SIGINT; | 11676 | exitstatus = 128 + SIGINT; |
11673 | return -1; | 11677 | /* bash behavior on ^C + ignored SIGINT: */ |
11678 | write(STDOUT_FILENO, "\n", 1); | ||
11679 | goto again; | ||
11674 | } | 11680 | } |
11675 | if (nr < 0) { | 11681 | if (nr < 0) { |
11676 | if (errno == 0) { | 11682 | if (errno == 0) { |
@@ -12235,7 +12241,7 @@ options(int *login_sh) | |||
12235 | int val; | 12241 | int val; |
12236 | int c; | 12242 | int c; |
12237 | 12243 | ||
12238 | if (login_sh) { | 12244 | if (login_sh != NULL) { /* if we came from startup code */ |
12239 | minusc = NULL; | 12245 | minusc = NULL; |
12240 | #if ENABLE_PLATFORM_MINGW32 | 12246 | #if ENABLE_PLATFORM_MINGW32 |
12241 | dirarg = NULL; | 12247 | dirarg = NULL; |
@@ -12251,7 +12257,7 @@ options(int *login_sh) | |||
12251 | if (c == '-') { | 12257 | if (c == '-') { |
12252 | val = 1; | 12258 | val = 1; |
12253 | if (p[0] == '\0' || LONE_DASH(p)) { | 12259 | if (p[0] == '\0' || LONE_DASH(p)) { |
12254 | if (!login_sh) { | 12260 | if (login_sh == NULL) { /* we came from setcmd() */ |
12255 | /* "-" means turn off -x and -v */ | 12261 | /* "-" means turn off -x and -v */ |
12256 | if (p[0] == '\0') | 12262 | if (p[0] == '\0') |
12257 | xflag = vflag = 0; | 12263 | xflag = vflag = 0; |
@@ -12264,7 +12270,7 @@ options(int *login_sh) | |||
12264 | } | 12270 | } |
12265 | /* first char was + or - */ | 12271 | /* first char was + or - */ |
12266 | while ((c = *p++) != '\0') { | 12272 | while ((c = *p++) != '\0') { |
12267 | if (login_sh) { | 12273 | if (login_sh != NULL) { /* if we came from startup code */ |
12268 | /* bash 3.2 indeed handles -c CMD and +c CMD the same */ | 12274 | /* bash 3.2 indeed handles -c CMD and +c CMD the same */ |
12269 | if (c == 'c') { | 12275 | if (c == 'c') { |
12270 | minusc = p; /* command is after shell args */ | 12276 | minusc = p; /* command is after shell args */ |
@@ -12306,6 +12312,9 @@ options(int *login_sh) | |||
12306 | if (strcmp(p, "login") == 0) { | 12312 | if (strcmp(p, "login") == 0) { |
12307 | *login_sh = 1; | 12313 | *login_sh = 1; |
12308 | } | 12314 | } |
12315 | /* TODO: --noprofile: e.g. if I want to run emergency shell from sulogin, | ||
12316 | * I want minimal/no shell init scripts - but it insists on running it as "-ash"... | ||
12317 | */ | ||
12309 | break; | 12318 | break; |
12310 | } | 12319 | } |
12311 | } | 12320 | } |