From: Ron Yorston Date: Thu, 20 Oct 2016 11:24:02 +0000 (+0100) Subject: ash: return exit status of nofork applets X-Git-Tag: 1_26_0~145 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5ccb0e92fa;p=oweals%2Fbusybox.git ash: return exit status of nofork applets The commit 'ash: eval: Return status in eval functions' changed how exit status is handled in eval functions. The case of nofork applets was missed, resulting in the incorrect status potentially being returned for nofork applets when FEATURE_SH_NOFORK is enabled. Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- diff --git a/shell/ash.c b/shell/ash.c index 50f479d1a..c9d39b875 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -9576,7 +9576,7 @@ evalcommand(union node *cmd, int flags) if (applet_no >= 0 && APPLET_IS_NOFORK(applet_no)) { listsetvar(varlist.list, VEXPORT|VSTACK); /* run _main() */ - exitstatus = run_nofork_applet(applet_no, argv); + status = run_nofork_applet(applet_no, argv); break; } #endif