You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2007/12/19 04:02:22 UTC
svn commit: r605395 - in /httpd/httpd/trunk/support: fcgistarter.c
httxt2dbm.c
Author: wrowe
Date: Tue Dec 18 19:02:22 2007
New Revision: 605395
URL: http://svn.apache.org/viewvc?rev=605395&view=rev
Log:
Handle args appropriately for an apr app.
Modified:
httpd/httpd/trunk/support/fcgistarter.c
httpd/httpd/trunk/support/httxt2dbm.c
Modified: httpd/httpd/trunk/support/fcgistarter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/fcgistarter.c?rev=605395&r1=605394&r2=605395&view=diff
==============================================================================
--- httpd/httpd/trunk/support/fcgistarter.c (original)
+++ httpd/httpd/trunk/support/fcgistarter.c Tue Dec 18 19:02:22 2007
@@ -53,7 +53,7 @@
exit(EXIT_FAILURE);
}
-int main(int argc, const char *argv[])
+int main(int argc, const char * const argv[])
{
apr_file_t *infd, *skwrapper;
apr_sockaddr_t *skaddr;
@@ -69,7 +69,7 @@
const char *interface = NULL;
const char *command = NULL;
- apr_initialize();
+ apr_app_initialize(&argc, &argv, NULL);
atexit(apr_terminate);
@@ -148,16 +148,18 @@
exit_error(rv, "apr_proc_detach");
}
+#if defined(WIN32) || defined(OS2) || defined(NETWARE)
+
+#error "Please implement me."
+
+#else
+
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;
-#if defined(WIN32) || defined(OS2) || defined(NETWARE)
-#error "Please implement me."
-#else
-
/* Ok, so we need a file that has file descriptor 0 (which
* FastCGI wants), but points to our socket. This isn't really
* possible in APR, so we cheat a bit. I have no idea how to
@@ -197,7 +199,7 @@
* is no longer fd 0, so it doesn't work. Sigh. */
execl(command, command, NULL);
-#endif
+
} else if (rv == APR_INPARENT) {
if (num_to_start == 0) {
apr_socket_close(skt);
@@ -206,6 +208,8 @@
exit_error(rv, "apr_proc_fork");
}
}
+
+#endif
return EXIT_SUCCESS;
}
Modified: httpd/httpd/trunk/support/httxt2dbm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/httxt2dbm.c?rev=605395&r1=605394&r2=605395&view=diff
==============================================================================
--- httpd/httpd/trunk/support/httxt2dbm.c (original)
+++ httpd/httpd/trunk/support/httxt2dbm.c Tue Dec 18 19:02:22 2007
@@ -183,7 +183,7 @@
apr_file_t *infile;
apr_dbm_t *outdbm;
- apr_initialize();
+ apr_app_initialize(&argc, &argv, NULL);
atexit(apr_terminate);
verbose = 0;