noexec: do GETOPT_RESET() before entering APPLET_main()

hush -c 'yes | head -1' was not happy.

function                                             old     new   delta
tryexec                                              159     169     +10
pseudo_exec_argv                                     328     338     +10

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2017-08-07 18:59:35 +02:00
parent f2cf1cc716
commit c9c1ccc4ed
3 changed files with 4 additions and 1 deletions

View File

@ -176,6 +176,7 @@ int FAST_FUNC spawn_and_wait(char **argv)
/* child */
/* reset some state and run without execing */
GETOPT_RESET();
/* msg_eol = "\n"; - no caller needs this reinited yet */
logmode = LOGMODE_STDIO;