aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2016-10-20 12:24:02 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2016-10-24 01:18:13 +0200
commit5ccb0e92faf90e1e9125da434b9c37e85d0aaf28 (patch)
treef5eb8ccb49485ff5ace44f83b36161cb267116fe /shell
parent6bbb48fadf2265c7ed806027781da8039e561865 (diff)
downloadbusybox-5ccb0e92faf90e1e9125da434b9c37e85d0aaf28.tar.gz
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 <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
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 <applet>_main() */
- exitstatus = run_nofork_applet(applet_no, argv);
+ status = run_nofork_applet(applet_no, argv);
break;
}
#endif