hush: fix func_return2.tests on NOMMU

function                                             old     new   delta
hush_main                                           1714    1718      +4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
pull/9/head
Denys Vlasenko 2018-04-09 17:54:07 +02:00
parent a1870f4807
commit eb0de05d68
1 changed files with 7 additions and 0 deletions

View File

@ -9393,6 +9393,13 @@ int hush_main(int argc, char **argv)
# if ENABLE_HUSH_LOOPS
optarg++;
G.depth_of_loop = bb_strtou(optarg, &optarg, 16);
# endif
# if ENABLE_HUSH_FUNCTIONS
/* nommu uses re-exec trick for "... | func | ...",
* should allow "return".
* This accidentally allows returns in subshells.
*/
G_flag_return_in_progress = -1;
# endif
break;
}