aboutsummaryrefslogtreecommitdiff
path: root/libbb/vfork_daemon_rexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/vfork_daemon_rexec.c')
-rw-r--r--libbb/vfork_daemon_rexec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c
index 576534ee5..4b3ed5a3b 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -18,6 +18,7 @@
18#include "busybox.h" /* uses applet tables */ 18#include "busybox.h" /* uses applet tables */
19#include "NUM_APPLETS.h" 19#include "NUM_APPLETS.h"
20 20
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,
22 * -1 for failure. Runs argv[0], searching path if that has no / in it. */ 23 * -1 for failure. Runs argv[0], searching path if that has no / in it. */
23pid_t FAST_FUNC spawn(char **argv) 24pid_t FAST_FUNC spawn(char **argv)
@@ -59,6 +60,7 @@ pid_t FAST_FUNC spawn(char **argv)
59 } 60 }
60 return pid; 61 return pid;
61} 62}
63#endif
62 64
63/* Die with an error message if we can't spawn a child process. */ 65/* Die with an error message if we can't spawn a child process. */
64pid_t FAST_FUNC xspawn(char **argv) 66pid_t FAST_FUNC xspawn(char **argv)
@@ -164,6 +166,7 @@ int FAST_FUNC spawn_and_wait(char **argv)
164 if (APPLET_IS_NOFORK(a)) 166 if (APPLET_IS_NOFORK(a))
165 return run_nofork_applet(a, argv); 167 return run_nofork_applet(a, argv);
166# if BB_MMU /* NOEXEC needs fork(), thus this is done only on MMU machines: */ 168# if BB_MMU /* NOEXEC needs fork(), thus this is done only on MMU machines: */
169# if !ENABLE_PLATFORM_MINGW32 /* and then only if not on Microsoft Windows */
167 if (APPLET_IS_NOEXEC(a)) { 170 if (APPLET_IS_NOEXEC(a)) {
168 fflush_all(); 171 fflush_all();
169 rc = fork(); 172 rc = fork();
@@ -182,6 +185,7 @@ int FAST_FUNC spawn_and_wait(char **argv)
182 /* xfunc_error_retval and applet_name are init by: */ 185 /* xfunc_error_retval and applet_name are init by: */
183 run_applet_no_and_exit(a, argv[0], argv); 186 run_applet_no_and_exit(a, argv[0], argv);
184 } 187 }
188# endif
185# endif 189# endif
186 } 190 }
187#endif /* FEATURE_PREFER_APPLETS */ 191#endif /* FEATURE_PREFER_APPLETS */