summaryrefslogtreecommitdiff
path: root/libbb/vfork_daemon_rexec.c
diff options
context:
space:
mode:
authorDenys Vlasenko2017-08-03 19:52:47 +0200
committerDenys Vlasenko2017-08-03 19:52:47 +0200
commit19c9f31af17f2c34e93c9c322b5c546ffbcda6ad (patch)
tree589df9d37647d8a8b26a1737c2b21f76f64fd1d6 /libbb/vfork_daemon_rexec.c
parent72d725d7cc6d5cd8ad6c69f7efb3b7046931395b (diff)
downloadbusybox-19c9f31af17f2c34e93c9c322b5c546ffbcda6ad.zip
busybox-19c9f31af17f2c34e93c9c322b5c546ffbcda6ad.tar.gz
nofork: fix a bug uncovered by hush testsuite (forgotten fflush)
function old new delta run_nofork_applet 280 287 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/vfork_daemon_rexec.c')
-rw-r--r--libbb/vfork_daemon_rexec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c
index 487ecb0..98512bb 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -143,6 +143,8 @@ int FAST_FUNC run_nofork_applet(int applet_no, char **argv)
applet_name = tmp_argv[0];
/* Finally we can call NOFORK applet's main() */
rc = applet_main[applet_no](argc, tmp_argv);
+ /* Important for shells: `which CMD` was failing */
+ fflush_all();
} else {
/* xfunc died in NOFORK applet */
}