diff options
author | Garrett Rooney <rooneg@apache.org> | 2006-04-22 05:55:02 +0200 |
---|---|---|
committer | Garrett Rooney <rooneg@apache.org> | 2006-04-22 05:55:02 +0200 |
commit | 149971197ea910efc5935e0c9f084d300efb6d7b (patch) | |
tree | fe476f9ff494e662ddd2213e6d88bba3384bc204 /support | |
parent | * CHANGES: Note the addition of mod_proxy_fcgi. (diff) | |
download | apache2-149971197ea910efc5935e0c9f084d300efb6d7b.tar.xz apache2-149971197ea910efc5935e0c9f084d300efb6d7b.zip |
* support/fcgistarter.c
(main): Oops, we need to detach before the fork, otherwise this all
totally fails to work...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@396069 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r-- | support/fcgistarter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/support/fcgistarter.c b/support/fcgistarter.c index ad9b9e5490..43500e82e8 100644 --- a/support/fcgistarter.c +++ b/support/fcgistarter.c @@ -144,17 +144,17 @@ int main(int argc, const char *argv[]) exit_error(rv, "apr_socket_listen"); } + rv = apr_proc_detach(APR_PROC_DETACH_DAEMONIZE); + if (rv) { + exit_error(rv, "apr_proc_detach"); + } + while (--num_to_start >= 0) { rv = apr_proc_fork(&proc, pool); if (rv == APR_INCHILD) { apr_os_file_t oft = 0; apr_os_sock_t oskt; - rv = apr_proc_detach(APR_PROC_DETACH_DAEMONIZE); - if (rv) { - exit_error(rv, "apr_proc_detach"); - } - #if defined(WIN32) || defined(OS2) || defined(NETWARE) #error "Please implement me." #else |