summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2024-04-12 15:16:40 +0200
committerYann Ylavic <ylavic@apache.org>2024-04-12 15:16:40 +0200
commit6ed524dc3f4c2f655cdd316ddc7b78e0477c696f (patch)
treeb9729de853899652f6df9318e1a1c4cc7e5c1502 /server
parentmpm_worker: Fix AH00045 about children processes not terminating timely. (diff)
downloadapache2-6ed524dc3f4c2f655cdd316ddc7b78e0477c696f.tar.xz
apache2-6ed524dc3f4c2f655cdd316ddc7b78e0477c696f.zip
mpm_event,mpm_worker: Comment about pollset sizing when APR_POLLSET_WAKEABLE.
Follow up to r1916925 and r1916926. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916929 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/mpm/event/event.c5
-rw-r--r--server/mpm/worker/worker.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c
index 372b94f61b..0a11046b86 100644
--- a/server/mpm/event/event.c
+++ b/server/mpm/event/event.c
@@ -2628,7 +2628,10 @@ static void setup_threads_runtime(void)
clean_child_exit(APEXIT_CHILDFATAL);
}
- /* Create the main pollset */
+ /* Create the main pollset. When APR_POLLSET_WAKEABLE is asked we account
+ * for the wakeup pipe explicitely with pollset_size+1 because some pollset
+ * implementations don't do it implicitely in APR.
+ */
pollset_flags = APR_POLLSET_THREADSAFE | APR_POLLSET_NOCOPY |
APR_POLLSET_WAKEABLE | APR_POLLSET_NODEFAULT;
for (i = 0; i < sizeof(good_methods) / sizeof(good_methods[0]); i++) {
diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c
index 2d1061f5cf..42b81a8ed1 100644
--- a/server/mpm/worker/worker.c
+++ b/server/mpm/worker/worker.c
@@ -909,7 +909,10 @@ static void setup_threads_runtime(void)
clean_child_exit(APEXIT_CHILDFATAL);
}
- /* Create the main pollset */
+ /* Create the main pollset. When APR_POLLSET_WAKEABLE is asked we account
+ * for the wakeup pipe explicitely with num_listensocks+1 because some
+ * pollset implementations don't do it implicitely in APR.
+ */
pollset_flags = APR_POLLSET_NOCOPY | APR_POLLSET_WAKEABLE;
rv = apr_pollset_create(&worker_pollset, num_listensocks + 1, pruntime,
pollset_flags);