]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Log a warning if ThreadStackSize has an inappropriate value.
authorChristophe Jaillet <jailletc36@apache.org>
Tue, 15 Jan 2013 21:53:07 +0000 (21:53 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Tue, 15 Jan 2013 21:53:07 +0000 (21:53 +0000)
PR : 54311
Submitted by: Tianyin Xu <tixu cs ucsd edu>

Only event.c has been compiled on my system. The 2 others are just cut and paste.
I have left the same value for APLOGNO in event and eventopt has for the other logged messages. I don't know if it is the right way to do.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1433682 13f79535-47bb-0310-9956-ffa450edef68

docs/log-message-tags/next-number
server/mpm/event/event.c
server/mpm/eventopt/eventopt.c
server/mpm/worker/worker.c

index ad9c93152370a53c8f4a8586ae49d251283ac7c0..9243b02f5b5a0d1cfc3c5202c94a5304fc447e50 100644 (file)
@@ -1 +1 @@
-2435
+2437
index 23d3c0e0105d2c2e9b2f20ab55af6ec409ea5df7..d2223636eac117ed114612dcc3713075a5448925 100644 (file)
@@ -2217,7 +2217,13 @@ static void child_main(int child_num_arg)
     apr_threadattr_detach_set(thread_attr, 0);
 
     if (ap_thread_stacksize != 0) {
-        apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        rv = apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(02436)
+                         "WARNING: ThreadStackSize of %" APR_SIZE_T_FMT " is "
+                         "inappropriate, using default", 
+                         ap_thread_stacksize);
+        }
     }
 
     ts->threads = threads;
index 7dcebf3d71ea9cf73a320da582e64b99fd25f7f6..0ecfc16bed0fe0d83c74850bd589c9c74fb28c38 100644 (file)
@@ -2222,7 +2222,13 @@ static void child_main(int child_num_arg)
     apr_threadattr_detach_set(thread_attr, 0);
 
     if (ap_thread_stacksize != 0) {
-        apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        rv = apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(02436)
+                         "WARNING: ThreadStackSize of %" APR_SIZE_T_FMT " is "
+                         "inappropriate, using default", 
+                         ap_thread_stacksize);
+        }
     }
 
     ts->threads = threads;
index bd105ce307c178c16eff8e707d95acb022e86382..47c144d4ef803d9a6952a0f709f1f18b4e758317 100644 (file)
@@ -1275,7 +1275,13 @@ static void child_main(int child_num_arg)
     apr_threadattr_detach_set(thread_attr, 0);
 
     if (ap_thread_stacksize != 0) {
-        apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        rv = apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(02435)
+                         "WARNING: ThreadStackSize of %" APR_SIZE_T_FMT " is "
+                         "inappropriate, using default", 
+                         ap_thread_stacksize);
+        }
     }
 
     ts->threads = threads;