diff options
-rw-r--r-- | include/mingw.h | 3 | ||||
-rw-r--r-- | libbb/vfork_daemon_rexec.c | 5 | ||||
-rw-r--r-- | win32/process.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/mingw.h b/include/mingw.h index 84522f032..d6ed909b5 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -433,12 +433,13 @@ int utimes(const char *file_name, const struct timeval times[2]); | |||
433 | #define is_dir_sep(c) ((c) == '/' || (c) == '\\') | 433 | #define is_dir_sep(c) ((c) == '/' || (c) == '\\') |
434 | #define PRIuMAX "I64u" | 434 | #define PRIuMAX "I64u" |
435 | 435 | ||
436 | pid_t mingw_spawn(char **argv); | 436 | pid_t FAST_FUNC mingw_spawn(char **argv); |
437 | int mingw_execv(const char *cmd, const char *const *argv); | 437 | int mingw_execv(const char *cmd, const char *const *argv); |
438 | int mingw_execvp(const char *cmd, const char *const *argv); | 438 | int mingw_execvp(const char *cmd, const char *const *argv); |
439 | int mingw_execve(const char *cmd, const char *const *argv, const char *const *envp); | 439 | int mingw_execve(const char *cmd, const char *const *argv, const char *const *envp); |
440 | pid_t mingw_spawn_applet(int mode, const char *applet, const char *const *argv, const char *const *envp); | 440 | pid_t mingw_spawn_applet(int mode, const char *applet, const char *const *argv, const char *const *envp); |
441 | pid_t mingw_spawn_1(int mode, const char *cmd, const char *const *argv, const char *const *envp); | 441 | pid_t mingw_spawn_1(int mode, const char *cmd, const char *const *argv, const char *const *envp); |
442 | #define spawn mingw_spawn | ||
442 | #define execvp mingw_execvp | 443 | #define execvp mingw_execvp |
443 | #define execve mingw_execve | 444 | #define execve mingw_execve |
444 | #define execv mingw_execv | 445 | #define execv mingw_execv |
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index 6611dabfa..de4d14fce 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. */ |
22 | pid_t FAST_FUNC spawn(char **argv) | 23 | pid_t FAST_FUNC spawn(char **argv) |
@@ -25,9 +26,6 @@ pid_t FAST_FUNC spawn(char **argv) | |||
25 | volatile int failed; | 26 | volatile int failed; |
26 | pid_t pid; | 27 | pid_t pid; |
27 | 28 | ||
28 | if (ENABLE_PLATFORM_MINGW32) | ||
29 | return mingw_spawn(argv); | ||
30 | |||
31 | fflush_all(); | 29 | fflush_all(); |
32 | 30 | ||
33 | /* Be nice to nommu machines. */ | 31 | /* Be nice to nommu machines. */ |
@@ -61,6 +59,7 @@ pid_t FAST_FUNC spawn(char **argv) | |||
61 | } | 59 | } |
62 | return pid; | 60 | return pid; |
63 | } | 61 | } |
62 | #endif | ||
64 | 63 | ||
65 | /* 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. */ |
66 | pid_t FAST_FUNC xspawn(char **argv) | 65 | pid_t FAST_FUNC xspawn(char **argv) |
diff --git a/win32/process.c b/win32/process.c index dc9e98305..e9db5311e 100644 --- a/win32/process.c +++ b/win32/process.c | |||
@@ -296,7 +296,7 @@ mingw_spawn_1(int mode, const char *cmd, const char *const *argv, const char *co | |||
296 | return ret; | 296 | return ret; |
297 | } | 297 | } |
298 | 298 | ||
299 | pid_t | 299 | pid_t FAST_FUNC |
300 | mingw_spawn(char **argv) | 300 | mingw_spawn(char **argv) |
301 | { | 301 | { |
302 | return mingw_spawn_1(P_NOWAIT, argv[0], (const char *const *)argv, (const char *const *)environ); | 302 | return mingw_spawn_1(P_NOWAIT, argv[0], (const char *const *)argv, (const char *const *)environ); |