aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-09-16 14:26:45 -0500
committerRob Landley <rob@landley.net>2018-09-16 14:30:20 -0500
commitbc5dcac48484c3cb8542715d45e126258e034b12 (patch)
tree0271e175e60283d77cc1661cc24b0b506cfd9b59
parent19f7ad4949e12fa667b448b01a5b703ac6d926de (diff)
downloadtoybox-bc5dcac48484c3cb8542715d45e126258e034b12.tar.gz
Nommu systems want to _exit() after vfork when exec fails, but should do cleanup ala fflush(0) after a normal exec() failure.
-rw-r--r--lib/xwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index d5ec9f64..3e0f57e4 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -191,7 +191,7 @@ void xexec(char **argv)
perror_msg("exec %s", argv[0]);
toys.exitval = 127;
- if (!CFG_TOYBOX_FORK) _exit(toys.exitval);
+ if (!toys.stacktop) _exit(toys.exitval);
xexit();
}