aboutsummaryrefslogtreecommitdiff
path: root/libbb/vfork_daemon_rexec.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-07-18 15:58:52 +0100
committerRon Yorston <rmy@pobox.com>2017-07-18 15:58:52 +0100
commitb680f05ad449505e3d914bebd4c8d83bf768c094 (patch)
treec08ded13d430b0e7e0104f2eb594fad190ce98a3 /libbb/vfork_daemon_rexec.c
parent258200ff81d5a9da54dab35acf36213eff1e399b (diff)
parent513a2457b65894b10b9fd6aa8753fca59eced08c (diff)
downloadbusybox-w32-b680f05ad449505e3d914bebd4c8d83bf768c094.tar.gz
busybox-w32-b680f05ad449505e3d914bebd4c8d83bf768c094.tar.bz2
busybox-w32-b680f05ad449505e3d914bebd4c8d83bf768c094.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb/vfork_daemon_rexec.c')
-rw-r--r--libbb/vfork_daemon_rexec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c
index 9ab49d0a1..4b3ed5a3b 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -16,6 +16,7 @@
16 */ 16 */
17 17
18#include "busybox.h" /* uses applet tables */ 18#include "busybox.h" /* uses applet tables */
19#include "NUM_APPLETS.h"
19 20
20#if !ENABLE_PLATFORM_MINGW32 21#if !ENABLE_PLATFORM_MINGW32
21/* This does a fork/exec in one call, using vfork(). Returns PID of new child, 22/* This does a fork/exec in one call, using vfork(). Returns PID of new child,
@@ -158,7 +159,7 @@ int FAST_FUNC run_nofork_applet(int applet_no, char **argv)
158int FAST_FUNC spawn_and_wait(char **argv) 159int FAST_FUNC spawn_and_wait(char **argv)
159{ 160{
160 int rc; 161 int rc;
161#if ENABLE_FEATURE_PREFER_APPLETS 162#if ENABLE_FEATURE_PREFER_APPLETS && (NUM_APPLETS > 1)
162 int a = find_applet_by_name(argv[0]); 163 int a = find_applet_by_name(argv[0]);
163 164
164 if (a >= 0) { 165 if (a >= 0) {
@@ -182,7 +183,7 @@ int FAST_FUNC spawn_and_wait(char **argv)
182 * as of yet (and that should probably always stay true). 183 * as of yet (and that should probably always stay true).
183 */ 184 */
184 /* xfunc_error_retval and applet_name are init by: */ 185 /* xfunc_error_retval and applet_name are init by: */
185 run_applet_no_and_exit(a, argv); 186 run_applet_no_and_exit(a, argv[0], argv);
186 } 187 }
187# endif 188# endif
188# endif 189# endif