You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/05/11 22:34:30 UTC
cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c
trawick 00/05/11 13:34:29
Modified: src/lib/apr/include apr_thread_proc.h
src/modules/mpm/prefork prefork.c
Log:
repair some compile warnings, axe a wasted getsockname() call and
some unnecessary local vars, fix bug in a rare trace of a pid
Revision Changes Path
1.29 +2 -2 apache-2.0/src/lib/apr/include/apr_thread_proc.h
Index: apr_thread_proc.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_thread_proc.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- apr_thread_proc.h 2000/05/04 00:27:49 1.28
+++ apr_thread_proc.h 2000/05/11 20:34:28 1.29
@@ -592,8 +592,8 @@
=cut
*/
-ap_status_t ap_wait_all_proc(ap_proc_t **proc, ap_wait_how_e waithow,
- ap_pool_t *p);
+ap_status_t ap_wait_all_procs(ap_proc_t **proc, ap_wait_how_e waithow,
+ ap_pool_t *p);
/*
1.83 +5 -16 apache-2.0/src/modules/mpm/prefork/prefork.c
Index: prefork.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- prefork.c 2000/05/04 19:42:56 1.82
+++ prefork.c 2000/05/11 20:34:29 1.83
@@ -89,6 +89,7 @@
#include "ap_config.h"
#include "apr_portable.h"
+#include "apr_thread_proc.h"
#include "httpd.h"
#include "mpm_default.h"
#include "mpm_status.h"
@@ -1397,13 +1398,6 @@
static void child_main(int child_num_arg)
{
-/* XXX replace int with NET_SIZE_T, this is defined in ap_config.h which
- has macros we can't make visible to this file, but it is the original
- type for clen.
-*/
- int clen;
- struct sockaddr sa_server;
- struct sockaddr sa_client;
ap_listen_rec *lr;
ap_listen_rec *last_lr;
ap_listen_rec *first_lr;
@@ -1542,7 +1536,6 @@
/* we didn't get a socket, and we were told to die */
clean_child_exit(0);
}
- clen = sizeof(sa_client);
stat = ap_accept(&csd, sd, ptrans);
if (stat == APR_SUCCESS || stat != APR_EINTR)
break;
@@ -1672,13 +1665,6 @@
ap_get_os_sock(&sockdes, csd);
- clen = sizeof(sa_server);
- if (getsockname(sockdes, &sa_server, &clen) < 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf, "getsockname");
- ap_close_socket(csd);
- continue;
- }
-
sock_disable_nagle(sockdes);
iol = unix_attach_socket(csd);
@@ -2136,9 +2122,12 @@
* scoreboard. Somehow we don't know about this
* child.
*/
+ ap_os_proc_t os_pid;
+
+ ap_get_os_proc(&os_pid, pid);
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING,
0, server_conf,
- "long lost child came home! (pid %d)", pid);
+ "long lost child came home! (pid %d)", os_pid);
}
/* Don't perform idle maintenance when a child dies,
* only do it when there's a timeout. Remember only a