SOURCES: httpd-2.0.48-metuxmpm-r8.patch - almost fixed; only apr_p...
arekm
arekm at pld-linux.org
Fri Dec 2 22:37:16 CET 2005
Author: arekm Date: Fri Dec 2 21:37:16 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- almost fixed; only apr_poll_revents_get() call left to be changed to new api
---- Files affected:
SOURCES:
httpd-2.0.48-metuxmpm-r8.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/httpd-2.0.48-metuxmpm-r8.patch
diff -u SOURCES/httpd-2.0.48-metuxmpm-r8.patch:1.1 SOURCES/httpd-2.0.48-metuxmpm-r8.patch:1.2
--- SOURCES/httpd-2.0.48-metuxmpm-r8.patch:1.1 Fri Aug 6 13:37:56 2004
+++ SOURCES/httpd-2.0.48-metuxmpm-r8.patch Fri Dec 2 22:37:10 2005
@@ -1,45 +1,36 @@
-diff -Nur httpd-2.0.48/server/mpm/config.m4 httpd-2.0.48-metuxmpm-r8/server/mpm/config.m4
---- httpd-2.0.48/server/mpm/config.m4 2003-03-11 00:07:52.000000000 -0700
-+++ httpd-2.0.48-metuxmpm-r8/server/mpm/config.m4 2004-03-19 10:03:32.132460289 -0700
+diff -urN httpd-2.2.0.org/server/mpm/config.m4 httpd-2.2.0/server/mpm/config.m4
+--- httpd-2.2.0.org/server/mpm/config.m4 2005-10-30 18:05:26.000000000 +0100
++++ httpd-2.2.0/server/mpm/config.m4 2005-12-02 22:06:33.105676750 +0100
@@ -1,7 +1,7 @@
AC_MSG_CHECKING(which MPM to use)
AC_ARG_WITH(mpm,
APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use.
-- MPM={beos|worker|prefork|mpmt_os2|perchild|leader|threadpool}),[
-+ MPM={beos|worker|prefork|mpmt_os2|perchild|leader|threadpool|metuxmpm}),[
+- MPM={beos|event|worker|prefork|mpmt_os2}),[
++ MPM={beos|event|worker|prefork|mpmt_os2|metuxmpm}),[
APACHE_MPM=$withval
],[
if test "x$APACHE_MPM" = "x"; then
-@@ -12,7 +12,7 @@
-
- apache_cv_mpm=$APACHE_MPM
+@@ -14,7 +14,7 @@
--if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm" = "threadpool" ; then
-+if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "metuxmpm" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm" = "threadpool" ; then
- APR_CHECK_APR_DEFINE(APR_HAS_THREADS)
-
- if test "x$ac_cv_define_APR_HAS_THREADS" = "xno"; then
-@@ -26,7 +26,7 @@
- APACHE_FAST_OUTPUT(server/mpm/Makefile)
+ ap_mpm_is_threaded ()
+ {
+- if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" ; then
++ if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "metuxmpm"; then
+ return 0
+ else
+ return 1
+@@ -23,7 +23,7 @@
- MPM_NAME=$apache_cv_mpm
--if test "$MPM_NAME" = "leader" -o "$MPM_NAME" = "threadpool" -o "$MPM_NAME" = "perchild"; then
-+if test "$MPM_NAME" = "leader" -o "$MPM_NAME" = "threadpool" -o "$MPM_NAME" = "perchild" -o "$MPM_NAME" = "metuxmpm"; then
- AC_MSG_WARN(You have selected an EXPERIMENTAL MPM. Be warned!)
- MPM_SUBDIR_NAME=experimental/$MPM_NAME
- else
-diff -Nur httpd-2.0.48/server/mpm/experimental/metuxmpm/Makefile.in httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/Makefile.in
---- httpd-2.0.48/server/mpm/experimental/metuxmpm/Makefile.in 1969-12-31 17:00:00.000000000 -0700
-+++ httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/Makefile.in 2004-03-19 10:03:32.132460289 -0700
-@@ -0,0 +1,5 @@
-+
-+LTLIBRARY_NAME = libmetuxmpm.la
-+LTLIBRARY_SOURCES = metuxmpm.c
-+
-+include $(top_srcdir)/build/ltlib.mk
-diff -Nur httpd-2.0.48/server/mpm/experimental/metuxmpm/config5.m4 httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/config5.m4
---- httpd-2.0.48/server/mpm/experimental/metuxmpm/config5.m4 1969-12-31 17:00:00.000000000 -0700
-+++ httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/config5.m4 2004-03-19 10:03:32.133460146 -0700
+ ap_mpm_is_experimental ()
+ {
+- if test "$apache_cv_mpm" = "event" ; then
++ if test "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "metuxmpm"; then
+ return 0
+ else
+ return 1
+diff -urN httpd-2.2.0.org/server/mpm/experimental/metuxmpm/config5.m4 httpd-2.2.0/server/mpm/experimental/metuxmpm/config5.m4
+--- httpd-2.2.0.org/server/mpm/experimental/metuxmpm/config5.m4 1970-01-01 01:00:00.000000000 +0100
++++ httpd-2.2.0/server/mpm/experimental/metuxmpm/config5.m4 2005-12-02 22:05:16.484888250 +0100
@@ -0,0 +1,6 @@
+dnl ## XXX - Need a more thorough check of the proper flags to use
+
@@ -47,10 +38,19 @@
+ AC_CHECK_FUNCS(pthread_kill)
+ APACHE_FAST_OUTPUT(server/mpm/$MPM_SUBDIR_NAME/Makefile)
+fi
-diff -Nur httpd-2.0.48/server/mpm/experimental/metuxmpm/metuxmpm.c httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/metuxmpm.c
---- httpd-2.0.48/server/mpm/experimental/metuxmpm/metuxmpm.c 1969-12-31 17:00:00.000000000 -0700
-+++ httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/metuxmpm.c 2004-03-19 10:57:21.869478056 -0700
-@@ -0,0 +1,2594 @@
+diff -urN httpd-2.2.0.org/server/mpm/experimental/metuxmpm/Makefile.in httpd-2.2.0/server/mpm/experimental/metuxmpm/Makefile.in
+--- httpd-2.2.0.org/server/mpm/experimental/metuxmpm/Makefile.in 1970-01-01 01:00:00.000000000 +0100
++++ httpd-2.2.0/server/mpm/experimental/metuxmpm/Makefile.in 2005-12-02 22:05:16.480888000 +0100
+@@ -0,0 +1,5 @@
++
++LTLIBRARY_NAME = libmetuxmpm.la
++LTLIBRARY_SOURCES = metuxmpm.c
++
++include $(top_srcdir)/build/ltlib.mk
+diff -urN httpd-2.2.0.org/server/mpm/experimental/metuxmpm/metuxmpm.c httpd-2.2.0/server/mpm/experimental/metuxmpm/metuxmpm.c
+--- httpd-2.2.0.org/server/mpm/experimental/metuxmpm/metuxmpm.c 1970-01-01 01:00:00.000000000 +0100
++++ httpd-2.2.0/server/mpm/experimental/metuxmpm/metuxmpm.c 2005-12-02 22:35:32.190362750 +0100
+@@ -0,0 +1,2599 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
@@ -872,7 +872,7 @@
+ if (workers_may_exit) return APR_SUCCESS;
+
+ apr_thread_mutex_lock(pipe_of_death_mutex);
-+ ret = apr_recv(lr->sd, &pipe_read_char, &n);
++ ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
+ if (APR_STATUS_IS_EAGAIN(ret))
+ {
+ /* It lost the lottery. It must continue to suffer
@@ -1046,12 +1046,17 @@
+
+ /* -- setup pollset -- */
+ /* NOTE: we do _not_ do this upwards anylonger */
-+ apr_poll_setup(&pollset, num_listensocks, tpool);
-+ apr_poll_setup(&pollset, num_listensocks, ptrans);
++ apr_pollset_create(&pollset, num_listensocks, tpool, 0);
++ apr_pollset_create(&pollset, num_listensocks, ptrans, 0);
+ for(lr_walk = ap_listeners; lr_walk != NULL; lr_walk = lr_walk->next)
+ {
+ int fd;
-+ apr_poll_socket_add(pollset, lr_walk->sd, APR_POLLIN);
++ apr_pollfd_t new_pollfd;
++ new_pollfd.desc_type = APR_POLL_SOCKET;
++ new_pollfd.reqevents = APR_POLLIN;
++ new_pollfd.desc.s = lr_walk->sd;
++ new_pollfd.client_data = lr_walk;
++ apr_pollset_add(pollset, &new_pollfd);
+ apr_os_sock_get(&fd, lr_walk->sd);
+ _DBG("adding fd %d to pollset", fd);
+ }
@@ -1641,7 +1646,7 @@
+ }
+#if APR_HAS_OTHER_CHILD
+ }
-+ else if (apr_proc_other_child_read(&pid, status) == 0)
++ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0)
+ {
+ /* handled */
+#endif
@@ -2645,10 +2650,10 @@
+ metuxmpm_hooks /* register_hooks */
+};
+
-diff -Nur httpd-2.0.48/server/mpm/experimental/metuxmpm/mpm.h httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/mpm.h
---- httpd-2.0.48/server/mpm/experimental/metuxmpm/mpm.h 1969-12-31 17:00:00.000000000 -0700
-+++ httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/mpm.h 2004-03-19 10:03:32.137459576 -0700
-@@ -0,0 +1,100 @@
+diff -urN httpd-2.2.0.org/server/mpm/experimental/metuxmpm/mpm_default.h httpd-2.2.0/server/mpm/experimental/metuxmpm/mpm_default.h
+--- httpd-2.2.0.org/server/mpm/experimental/metuxmpm/mpm_default.h 1970-01-01 01:00:00.000000000 +0100
++++ httpd-2.2.0/server/mpm/experimental/metuxmpm/mpm_default.h 2005-12-02 22:05:16.488888500 +0100
+@@ -0,0 +1,115 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
@@ -2707,52 +2712,67 @@
+ * University of Illinois, Urbana-Champaign.
+ */
+
-+#include "httpd.h"
-+#include "mpm_default.h"
-+#include "unixd.h"
++#ifndef APACHE_MPM_DEFAULT_H
++#define APACHE_MPM_DEFAULT_H
+
-+#ifndef APACHE_MPM_METUXMPM_H
-+#define APACHE_MPM_METUXMPM_H
++#define NO_SERIALIZED_ACCEPT
+
-+#define METUXMPM_MPM
++/* Number of threads to spawn off by default --- also, if fewer than
++ * this free when the caretaker checks, it will spawn more.
++ */
++#ifndef DEFAULT_START_THREAD
++#define DEFAULT_START_THREAD 5
++#endif
+
-+#define MPM_NAME "metuxmpm"
++/* Maximum number of *free* server threads --- more than this, and
++ * they will die off.
++ */
+
-+#define AP_MPM_WANT_RECLAIM_CHILD_PROCESSES
-+#define AP_MPM_WANT_WAIT_OR_TIMEOUT
-+#define AP_MPM_WANT_PROCESS_CHILD_STATUS
-+#define AP_MPM_WANT_SET_PIDFILE
-+#define AP_MPM_WANT_SET_SCOREBOARD
-+#define AP_MPM_WANT_SET_LOCKFILE
-+#define AP_MPM_WANT_SET_MAX_REQUESTS
-+#define AP_MPM_WANT_SET_COREDUMPDIR
-+#define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
-+#define AP_MPM_WANT_SIGNAL_SERVER
-+#define AP_MPM_USES_POD
++#ifndef DEFAULT_MAX_SPARE_THREAD
++#define DEFAULT_MAX_SPARE_THREAD 10
++#endif
+
-+#define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
-+#define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
-+#define MPM_ACCEPT_FUNC unixd_accept
++/* Minimum --- fewer than this, and more will be created */
+
-+/* Table of child status */
-+#define SERVER_DEAD 0
-+#define SERVER_DYING 1
-+#define SERVER_ALIVE 2
++#ifndef DEFAULT_MIN_SPARE_THREAD
++#define DEFAULT_MIN_SPARE_THREAD 5
++#endif
+
-+typedef struct ap_ctable{
-+ pid_t pid;
-+ unsigned char status;
-+} ap_ctable;
++/* Number of servers to spawn off by default
++ */
++#ifndef DEFAULT_NUM_DAEMON
++#define DEFAULT_NUM_DAEMON 2
++#endif
+
-+extern int ap_threads_per_child;
-+extern int ap_max_daemons_limit;
-+extern server_rec *ap_server_conf;
++/* File used for accept locking, when we use a file */
++#ifndef DEFAULT_LOCKFILE
++#define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock"
++#endif
+
-+#endif /* APACHE_MPM_METUXMPM_H */
-diff -Nur httpd-2.0.48/server/mpm/experimental/metuxmpm/mpm_default.h httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/mpm_default.h
---- httpd-2.0.48/server/mpm/experimental/metuxmpm/mpm_default.h 1969-12-31 17:00:00.000000000 -0700
-+++ httpd-2.0.48-metuxmpm-r8/server/mpm/experimental/metuxmpm/mpm_default.h 2004-03-19 10:03:32.138459433 -0700
-@@ -0,0 +1,115 @@
++/* Where the main/parent process's pid is logged */
++#ifndef DEFAULT_PIDLOG
++#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
++#endif
++
++/*
++ * Interval, in microseconds, between scoreboard maintenance.
++ */
++#ifndef SCOREBOARD_MAINTENANCE_INTERVAL
++#define SCOREBOARD_MAINTENANCE_INTERVAL 1000000
++#endif
++
++/* Number of requests to try to handle in a single process. If <= 0,
++ * the children don't die off.
++ */
++#ifndef DEFAULT_MAX_REQUESTS_PER_CHILD
++#define DEFAULT_MAX_REQUESTS_PER_CHILD 10000
++#endif
++
++#endif /* AP_MPM_DEFAULT_H */
+diff -urN httpd-2.2.0.org/server/mpm/experimental/metuxmpm/mpm.h httpd-2.2.0/server/mpm/experimental/metuxmpm/mpm.h
+--- httpd-2.2.0.org/server/mpm/experimental/metuxmpm/mpm.h 1970-01-01 01:00:00.000000000 +0100
++++ httpd-2.2.0/server/mpm/experimental/metuxmpm/mpm.h 2005-12-02 22:05:16.484888250 +0100
+@@ -0,0 +1,100 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
@@ -2811,67 +2831,52 @@
+ * University of Illinois, Urbana-Champaign.
+ */
+
-+#ifndef APACHE_MPM_DEFAULT_H
-+#define APACHE_MPM_DEFAULT_H
-+
-+#define NO_SERIALIZED_ACCEPT
-+
-+/* Number of threads to spawn off by default --- also, if fewer than
-+ * this free when the caretaker checks, it will spawn more.
-+ */
-+#ifndef DEFAULT_START_THREAD
-+#define DEFAULT_START_THREAD 5
-+#endif
-+
-+/* Maximum number of *free* server threads --- more than this, and
-+ * they will die off.
-+ */
++#include "httpd.h"
++#include "mpm_default.h"
++#include "unixd.h"
+
-+#ifndef DEFAULT_MAX_SPARE_THREAD
-+#define DEFAULT_MAX_SPARE_THREAD 10
-+#endif
++#ifndef APACHE_MPM_METUXMPM_H
++#define APACHE_MPM_METUXMPM_H
+
-+/* Minimum --- fewer than this, and more will be created */
++#define METUXMPM_MPM
+
-+#ifndef DEFAULT_MIN_SPARE_THREAD
-+#define DEFAULT_MIN_SPARE_THREAD 5
-+#endif
++#define MPM_NAME "metuxmpm"
+
-+/* Number of servers to spawn off by default
-+ */
-+#ifndef DEFAULT_NUM_DAEMON
-+#define DEFAULT_NUM_DAEMON 2
-+#endif
++#define AP_MPM_WANT_RECLAIM_CHILD_PROCESSES
++#define AP_MPM_WANT_WAIT_OR_TIMEOUT
++#define AP_MPM_WANT_PROCESS_CHILD_STATUS
++#define AP_MPM_WANT_SET_PIDFILE
++#define AP_MPM_WANT_SET_SCOREBOARD
++#define AP_MPM_WANT_SET_LOCKFILE
++#define AP_MPM_WANT_SET_MAX_REQUESTS
++#define AP_MPM_WANT_SET_COREDUMPDIR
++#define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
++#define AP_MPM_WANT_SIGNAL_SERVER
++#define AP_MPM_USES_POD
+
-+/* File used for accept locking, when we use a file */
-+#ifndef DEFAULT_LOCKFILE
-+#define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock"
-+#endif
++#define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
++#define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
++#define MPM_ACCEPT_FUNC unixd_accept
+
-+/* Where the main/parent process's pid is logged */
-+#ifndef DEFAULT_PIDLOG
-+#define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
-+#endif
++/* Table of child status */
++#define SERVER_DEAD 0
++#define SERVER_DYING 1
++#define SERVER_ALIVE 2
+
-+/*
-+ * Interval, in microseconds, between scoreboard maintenance.
-+ */
-+#ifndef SCOREBOARD_MAINTENANCE_INTERVAL
-+#define SCOREBOARD_MAINTENANCE_INTERVAL 1000000
-+#endif
++typedef struct ap_ctable{
++ pid_t pid;
++ unsigned char status;
++} ap_ctable;
+
-+/* Number of requests to try to handle in a single process. If <= 0,
-+ * the children don't die off.
-+ */
-+#ifndef DEFAULT_MAX_REQUESTS_PER_CHILD
-+#define DEFAULT_MAX_REQUESTS_PER_CHILD 10000
-+#endif
++extern int ap_threads_per_child;
++extern int ap_max_daemons_limit;
++extern server_rec *ap_server_conf;
+
-+#endif /* AP_MPM_DEFAULT_H */
-diff -Nur httpd-2.0.48/srclib/apr/network_io/unix/sockets.c httpd-2.0.48-metuxmpm-r8/srclib/apr/network_io/unix/sockets.c
---- httpd-2.0.48/srclib/apr/network_io/unix/sockets.c 2003-07-08 06:53:11.000000000 -0600
-+++ httpd-2.0.48-metuxmpm-r8/srclib/apr/network_io/unix/sockets.c 2004-03-19 10:03:32.138459433 -0700
-@@ -411,7 +411,36 @@
++#endif /* APACHE_MPM_METUXMPM_H */
+diff -urN httpd-2.2.0.org/srclib/apr/network_io/unix/sockets.c httpd-2.2.0/srclib/apr/network_io/unix/sockets.c
+--- httpd-2.2.0.org/srclib/apr/network_io/unix/sockets.c 2005-09-09 10:21:17.000000000 +0200
++++ httpd-2.2.0/srclib/apr/network_io/unix/sockets.c 2005-12-02 22:05:16.488888500 +0100
+@@ -416,7 +416,36 @@
set_socket_vars(*sock, APR_INET, SOCK_STREAM, 0);
(*sock)->timeout = -1;
}
@@ -2909,3 +2914,4 @@
(*sock)->remote_addr_unknown = 1;
(*sock)->socketdes = *thesock;
return APR_SUCCESS;
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/httpd-2.0.48-metuxmpm-r8.patch?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list