]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* server/mpm/prefork/prefork.c (child_main): Don't log errors for an
authorJoe Orton <jorton@apache.org>
Wed, 19 Sep 2012 15:09:35 +0000 (15:09 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 19 Sep 2012 15:09:35 +0000 (15:09 +0000)
  apr_pollset_add() failure if a graceful-stop has been signalled.

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

server/mpm/prefork/prefork.c

index d0cf59b4cbe95f7cea30d6aba5d6ae4100f0362d..0c6254e1ec98d4aeb59dc2cab332adcd4951dfee 100644 (file)
@@ -564,8 +564,14 @@ static void child_main(int child_num_arg)
 
         status = apr_pollset_add(pollset, &pfd);
         if (status != APR_SUCCESS) {
-            ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(00157)
-                         "Couldn't add listener to pollset; check system or user limits");
+            /* If the child processed a SIGWINCH before setting up the
+             * pollset, this error path is expected and harmless,
+             * since the listener fd was already closed; so don't
+             * pollute the logs in that case. */
+            if (!die_now) {
+                ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(00157)
+                             "Couldn't add listener to pollset; check system or user limits");
+            }
             clean_child_exit(APEXIT_CHILDSICK);
         }