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 fd481bf6e..9ab49d0a1 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -17,6 +17,7 @@
17 17
18#include "busybox.h" /* uses applet tables */ 18#include "busybox.h" /* uses applet tables */
19 19
20#if !ENABLE_PLATFORM_MINGW32
20/* This does a fork/exec in one call, using vfork(). Returns PID of new child, 21/* This does a fork/exec in one call, using vfork(). Returns PID of new child,
21 * -1 for failure. Runs argv[0], searching path if that has no / in it. */ 22 * -1 for failure. Runs argv[0], searching path if that has no / in it. */
22pid_t FAST_FUNC spawn(char **argv) 23pid_t FAST_FUNC spawn(char **argv)
@@ -58,6 +59,7 @@ pid_t FAST_FUNC spawn(char **argv)
58 } 59 }
59 return pid; 60 return pid;
60} 61}
62#endif
61 63
62/* Die with an error message if we can't spawn a child process. */ 64/* Die with an error message if we can't spawn a child process. */
63pid_t FAST_FUNC xspawn(char **argv) 65pid_t FAST_FUNC xspawn(char **argv)
@@ -163,6 +165,7 @@ int FAST_FUNC spawn_and_wait(char **argv)
163 if (APPLET_IS_NOFORK(a)) 165 if (APPLET_IS_NOFORK(a))
164 return run_nofork_applet(a, argv); 166 return run_nofork_applet(a, argv);
165# if BB_MMU /* NOEXEC needs fork(), thus this is done only on MMU machines: */ 167# if BB_MMU /* NOEXEC needs fork(), thus this is done only on MMU machines: */
168# if !ENABLE_PLATFORM_MINGW32 /* and then only if not on Microsoft Windows */
166 if (APPLET_IS_NOEXEC(a)) { 169 if (APPLET_IS_NOEXEC(a)) {
167 fflush_all(); 170 fflush_all();
168 rc = fork(); 171 rc = fork();
@@ -181,6 +184,7 @@ int FAST_FUNC spawn_and_wait(char **argv)
181 /* xfunc_error_retval and applet_name are init by: */ 184 /* xfunc_error_retval and applet_name are init by: */
182 run_applet_no_and_exit(a, argv); 185 run_applet_no_and_exit(a, argv);
183 } 186 }
187# endif
184# endif 188# endif
185 } 189 }
186#endif /* FEATURE_PREFER_APPLETS */ 190#endif /* FEATURE_PREFER_APPLETS */