diff options
author | Ron Yorston <rmy@pobox.com> | 2017-07-18 15:58:52 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-07-18 15:58:52 +0100 |
commit | b680f05ad449505e3d914bebd4c8d83bf768c094 (patch) | |
tree | c08ded13d430b0e7e0104f2eb594fad190ce98a3 /libbb/vfork_daemon_rexec.c | |
parent | 258200ff81d5a9da54dab35acf36213eff1e399b (diff) | |
parent | 513a2457b65894b10b9fd6aa8753fca59eced08c (diff) | |
download | busybox-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.c | 5 |
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) | |||
158 | int FAST_FUNC spawn_and_wait(char **argv) | 159 | int 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 |