diff options
author | Ron Yorston <rmy@pobox.com> | 2023-12-15 11:55:30 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-12-15 11:55:30 +0000 |
commit | ba7d37766ec090e87a6a9cc3af685521390c6c6d (patch) | |
tree | e50a0ecb67c22bbcb497b9eea7208f7c75789b6a /include | |
parent | 06e977c68e8cbfdd50b19a9197f31ba5af02c0d4 (diff) | |
download | busybox-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.h | 2 |
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 | ||
550 | char ** FAST_FUNC grow_argv(char **argv, int n); | 550 | char ** FAST_FUNC grow_argv(char **argv, int n); |
551 | pid_t FAST_FUNC mingw_spawn(char **argv); | 551 | pid_t FAST_FUNC mingw_spawn(char **argv); |
552 | pid_t FAST_FUNC mingw_spawn_detach(char **argv); | 552 | intptr_t FAST_FUNC mingw_spawn_detach(char **argv); |
553 | intptr_t FAST_FUNC mingw_spawn_proc(const char **argv); | 553 | intptr_t FAST_FUNC mingw_spawn_proc(const char **argv); |
554 | int mingw_execv(const char *cmd, char *const *argv); | 554 | int mingw_execv(const char *cmd, char *const *argv); |
555 | int mingw_execvp(const char *cmd, char *const *argv); | 555 | int mingw_execvp(const char *cmd, char *const *argv); |