diff options
author | Ron Yorston <rmy@pobox.com> | 2020-05-29 10:49:00 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-05-29 11:03:33 +0100 |
commit | 53c09d0e1720bd927a2995f87df324a9854f1771 (patch) | |
tree | 982b357d9d188cfb6a1d488ebaba6c42d818209f /shell | |
parent | d4247a9f03290a96433e18dba538404005a21311 (diff) | |
parent | 45fa3f18adf57ef9d743038743d9c90573aeeb91 (diff) | |
download | busybox-w32-53c09d0e1720bd927a2995f87df324a9854f1771.tar.gz busybox-w32-53c09d0e1720bd927a2995f87df324a9854f1771.tar.bz2 busybox-w32-53c09d0e1720bd927a2995f87df324a9854f1771.zip |
Merge branch 'busybox' into mergeFRP-3466-g53c09d0e1
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 7 | ||||
-rwxr-xr-x | shell/ash_test/ash-misc/exitcode_trap2.tests | 3 | ||||
-rwxr-xr-x | shell/ash_test/ash-misc/exitcode_trap6.tests | 3 | ||||
-rw-r--r-- | shell/hush.c | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/exitcode_trap2.tests | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/exitcode_trap6.tests | 3 |
6 files changed, 9 insertions, 13 deletions
diff --git a/shell/ash.c b/shell/ash.c index c6f64e202..27e097a99 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -9251,7 +9251,6 @@ typecmd(int argc UNUSED_PARAM, char **argv) | |||
9251 | return err; | 9251 | return err; |
9252 | } | 9252 | } |
9253 | 9253 | ||
9254 | #if ENABLE_ASH_CMDCMD | ||
9255 | static struct strlist * | 9254 | static struct strlist * |
9256 | fill_arglist(struct arglist *arglist, union node **argpp) | 9255 | fill_arglist(struct arglist *arglist, union node **argpp) |
9257 | { | 9256 | { |
@@ -9268,6 +9267,7 @@ fill_arglist(struct arglist *arglist, union node **argpp) | |||
9268 | return *lastp; | 9267 | return *lastp; |
9269 | } | 9268 | } |
9270 | 9269 | ||
9270 | #if ENABLE_ASH_CMDCMD | ||
9271 | /* Is it "command [-p] PROG ARGS" bltin, no other opts? Return ptr to "PROG" if yes */ | 9271 | /* Is it "command [-p] PROG ARGS" bltin, no other opts? Return ptr to "PROG" if yes */ |
9272 | static int | 9272 | static int |
9273 | parse_command_args(struct arglist *arglist, union node **argpp, const char **path) | 9273 | parse_command_args(struct arglist *arglist, union node **argpp, const char **path) |
@@ -10882,11 +10882,13 @@ evalcommand(union node *cmd, int flags) | |||
10882 | vlocal = !spclbltin; | 10882 | vlocal = !spclbltin; |
10883 | } | 10883 | } |
10884 | cmd_is_exec = cmdentry.u.cmd == EXECCMD; | 10884 | cmd_is_exec = cmdentry.u.cmd == EXECCMD; |
10885 | #if ENABLE_ASH_CMDCMD | ||
10885 | if (cmdentry.u.cmd != COMMANDCMD) | 10886 | if (cmdentry.u.cmd != COMMANDCMD) |
10886 | break; | 10887 | break; |
10887 | 10888 | ||
10888 | cmd_flag = parse_command_args(&arglist, &argp, &path); | 10889 | cmd_flag = parse_command_args(&arglist, &argp, &path); |
10889 | if (!cmd_flag) | 10890 | if (!cmd_flag) |
10891 | #endif | ||
10890 | break; | 10892 | break; |
10891 | } | 10893 | } |
10892 | 10894 | ||
@@ -14574,8 +14576,7 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
14574 | static int FAST_FUNC | 14576 | static int FAST_FUNC |
14575 | historycmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 14577 | historycmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
14576 | { | 14578 | { |
14577 | if (line_input_state) | 14579 | show_history(line_input_state); |
14578 | show_history(line_input_state); | ||
14579 | return EXIT_SUCCESS; | 14580 | return EXIT_SUCCESS; |
14580 | } | 14581 | } |
14581 | #endif | 14582 | #endif |
diff --git a/shell/ash_test/ash-misc/exitcode_trap2.tests b/shell/ash_test/ash-misc/exitcode_trap2.tests index f259774bf..aff6d5187 100755 --- a/shell/ash_test/ash-misc/exitcode_trap2.tests +++ b/shell/ash_test/ash-misc/exitcode_trap2.tests | |||
@@ -3,7 +3,6 @@ | |||
3 | $THIS_SH -c ' | 3 | $THIS_SH -c ' |
4 | trap "false;exit" term | 4 | trap "false;exit" term |
5 | kill $$ & | 5 | kill $$ & |
6 | (exit 42) | 6 | (sleep 1; exit 42) |
7 | wait | ||
8 | ' | 7 | ' |
9 | echo 42:$? | 8 | echo 42:$? |
diff --git a/shell/ash_test/ash-misc/exitcode_trap6.tests b/shell/ash_test/ash-misc/exitcode_trap6.tests index 15fb99d2d..59a07fc91 100755 --- a/shell/ash_test/ash-misc/exitcode_trap6.tests +++ b/shell/ash_test/ash-misc/exitcode_trap6.tests | |||
@@ -5,7 +5,6 @@ $THIS_SH -c ' | |||
5 | trap "echo INT" int | 5 | trap "echo INT" int |
6 | trap "kill -int $$;exit" term | 6 | trap "kill -int $$;exit" term |
7 | kill $$ & | 7 | kill $$ & |
8 | (exit 42) | 8 | (sleep 1; exit 42) |
9 | wait | ||
10 | ' | 9 | ' |
11 | echo 42:$? | 10 | echo 42:$? |
diff --git a/shell/hush.c b/shell/hush.c index 0a92f5da7..cab7ea5b0 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -10461,8 +10461,7 @@ static int FAST_FUNC builtin_help(char **argv UNUSED_PARAM) | |||
10461 | #if MAX_HISTORY && ENABLE_FEATURE_EDITING | 10461 | #if MAX_HISTORY && ENABLE_FEATURE_EDITING |
10462 | static int FAST_FUNC builtin_history(char **argv UNUSED_PARAM) | 10462 | static int FAST_FUNC builtin_history(char **argv UNUSED_PARAM) |
10463 | { | 10463 | { |
10464 | if (G.line_input_state) | 10464 | show_history(G.line_input_state); |
10465 | show_history(G.line_input_state); | ||
10466 | return EXIT_SUCCESS; | 10465 | return EXIT_SUCCESS; |
10467 | } | 10466 | } |
10468 | #endif | 10467 | #endif |
diff --git a/shell/hush_test/hush-misc/exitcode_trap2.tests b/shell/hush_test/hush-misc/exitcode_trap2.tests index f259774bf..aff6d5187 100755 --- a/shell/hush_test/hush-misc/exitcode_trap2.tests +++ b/shell/hush_test/hush-misc/exitcode_trap2.tests | |||
@@ -3,7 +3,6 @@ | |||
3 | $THIS_SH -c ' | 3 | $THIS_SH -c ' |
4 | trap "false;exit" term | 4 | trap "false;exit" term |
5 | kill $$ & | 5 | kill $$ & |
6 | (exit 42) | 6 | (sleep 1; exit 42) |
7 | wait | ||
8 | ' | 7 | ' |
9 | echo 42:$? | 8 | echo 42:$? |
diff --git a/shell/hush_test/hush-misc/exitcode_trap6.tests b/shell/hush_test/hush-misc/exitcode_trap6.tests index 15fb99d2d..59a07fc91 100755 --- a/shell/hush_test/hush-misc/exitcode_trap6.tests +++ b/shell/hush_test/hush-misc/exitcode_trap6.tests | |||
@@ -5,7 +5,6 @@ $THIS_SH -c ' | |||
5 | trap "echo INT" int | 5 | trap "echo INT" int |
6 | trap "kill -int $$;exit" term | 6 | trap "kill -int $$;exit" term |
7 | kill $$ & | 7 | kill $$ & |
8 | (exit 42) | 8 | (sleep 1; exit 42) |
9 | wait | ||
10 | ' | 9 | ' |
11 | echo 42:$? | 10 | echo 42:$? |