aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-12-15 11:55:30 +0000
committerRon Yorston <rmy@pobox.com>2023-12-15 11:55:30 +0000
commitba7d37766ec090e87a6a9cc3af685521390c6c6d (patch)
treee50a0ecb67c22bbcb497b9eea7208f7c75789b6a /include
parent06e977c68e8cbfdd50b19a9197f31ba5af02c0d4 (diff)
downloadbusybox-w32-ba7d37766ec090e87a6a9cc3af685521390c6c6d.tar.gz
busybox-w32-ba7d37766ec090e87a6a9cc3af685521390c6c6d.tar.bz2
busybox-w32-ba7d37766ec090e87a6a9cc3af685521390c6c6d.zip
httpd: fix return code when run in background
When httpd was run in the background the return code of the parent process was incorrect. It seems when spawn() is run in _P_DETACH mode it returns 0 on success, not a process handle. Fix the test for the return code and alter mingw_spawn_detach() so it doesn't treat the return from spawn() as a handle. Saves 32 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index eab756184..46cbe03f8 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -549,7 +549,7 @@ int utimes(const char *file_name, const struct timeval times[2]);
549 549
550char ** FAST_FUNC grow_argv(char **argv, int n); 550char ** FAST_FUNC grow_argv(char **argv, int n);
551pid_t FAST_FUNC mingw_spawn(char **argv); 551pid_t FAST_FUNC mingw_spawn(char **argv);
552pid_t FAST_FUNC mingw_spawn_detach(char **argv); 552intptr_t FAST_FUNC mingw_spawn_detach(char **argv);
553intptr_t FAST_FUNC mingw_spawn_proc(const char **argv); 553intptr_t FAST_FUNC mingw_spawn_proc(const char **argv);
554int mingw_execv(const char *cmd, char *const *argv); 554int mingw_execv(const char *cmd, char *const *argv);
555int mingw_execvp(const char *cmd, char *const *argv); 555int mingw_execvp(const char *cmd, char *const *argv);