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 6125983ce..eca2fabf5 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -151,6 +151,7 @@ void FAST_FUNC run_noexec_applet_and_exit(int a, const char *name, char **argv)
151 * Higher-level code, hiding optional NOFORK/NOEXEC trickery. 151 * Higher-level code, hiding optional NOFORK/NOEXEC trickery.
152 */ 152 */
153 153
154#if !ENABLE_PLATFORM_MINGW32
154/* This does a fork/exec in one call, using vfork(). Returns PID of new child, 155/* This does a fork/exec in one call, using vfork(). Returns PID of new child,
155 * -1 for failure. Runs argv[0], searching path if that has no / in it. */ 156 * -1 for failure. Runs argv[0], searching path if that has no / in it. */
156pid_t FAST_FUNC spawn(char **argv) 157pid_t FAST_FUNC spawn(char **argv)
@@ -192,6 +193,7 @@ pid_t FAST_FUNC spawn(char **argv)
192 } 193 }
193 return pid; 194 return pid;
194} 195}
196#endif
195 197
196/* Die with an error message if we can't spawn a child process. */ 198/* Die with an error message if we can't spawn a child process. */
197pid_t FAST_FUNC xspawn(char **argv) 199pid_t FAST_FUNC xspawn(char **argv)
@@ -212,6 +214,7 @@ int FAST_FUNC spawn_and_wait(char **argv)
212 if (APPLET_IS_NOFORK(a)) 214 if (APPLET_IS_NOFORK(a))
213 return run_nofork_applet(a, argv); 215 return run_nofork_applet(a, argv);
214# if BB_MMU /* NOEXEC needs fork(), thus this is done only on MMU machines: */ 216# if BB_MMU /* NOEXEC needs fork(), thus this is done only on MMU machines: */
217# if !ENABLE_PLATFORM_MINGW32 /* and then only if not on Microsoft Windows */
215 if (APPLET_IS_NOEXEC(a)) { 218 if (APPLET_IS_NOEXEC(a)) {
216 fflush_all(); 219 fflush_all();
217 rc = fork(); 220 rc = fork();
@@ -221,6 +224,7 @@ int FAST_FUNC spawn_and_wait(char **argv)
221 /* child */ 224 /* child */
222 run_noexec_applet_and_exit(a, argv[0], argv); 225 run_noexec_applet_and_exit(a, argv[0], argv);
223 } 226 }
227# endif
224# endif 228# endif
225 } 229 }
226#endif 230#endif