hush: fix "getopts" builtin to not be upset by other builtins calling getopt()
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 29 Aug 2017 11:38:30 +0000 (13:38 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 29 Aug 2017 11:38:30 +0000 (13:38 +0200)
commit238ff98bb85adfb5563d10b37ea4c33fef3af2f2
treea556435d7011ee928419d26a9d7d796745f97f62
parent0d1eaf407c3d077f1d6ec97ceffbafbe7591ecbf
hush: fix "getopts" builtin to not be upset by other builtins calling getopt()

function                                             old     new   delta
builtin_getopts                                      363     403     +40
unset_local_var_len                                  185     215     +30
set_local_var                                        440     466     +26
reset_traps_to_defaults                              151     157      +6
pseudo_exec_argv                                     320     326      +6
install_special_sighandlers                           52      58      +6
pick_sighandler                                       62      65      +3
execvp_or_die                                         85      88      +3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/0 up/down: 120/0)             Total: 120 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash_test/ash-getopts/getopt_nested.right [new file with mode: 0644]
shell/ash_test/ash-getopts/getopt_nested.tests [new file with mode: 0755]
shell/hush.c
shell/hush_test/hush-getopts/getopt_nested.right [new file with mode: 0644]
shell/hush_test/hush-getopts/getopt_nested.tests [new file with mode: 0755]