You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2012/10/03 12:03:32 UTC

svn commit: r1393382 - in /httpd/httpd/branches/2.4.x: ./ CHANGES server/mpm/prefork/prefork.c

Author: jorton
Date: Wed Oct  3 10:03:32 2012
New Revision: 1393382

URL: http://svn.apache.org/viewvc?rev=1393382&view=rev
Log:
Merge 1387633,1392850 from trunk:

* server/mpm/prefork/prefork.c (child_main): Don't log errors for an
  apr_pollset_add() failure if a graceful-stop has been signalled.

follow up to r1387633: use the right exit code depending on the error scenario

Submitted by: jorton, trawick
Reviewed by: trawick, minfrin, jorton

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/server/mpm/prefork/prefork.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1387633,1392850

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1393382&r1=1393381&r2=1393382&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Wed Oct  3 10:03:32 2012
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 
 Changes with Apache 2.4.4
+ 
+  *) prefork: Avoid logging harmless errors during graceful stop.
+     [Joe Orton, Jeff Trawick]
 
   *) mod_proxy: When concatting for PPR, avoid cases where we
      concat ".../" and "/..." to create "...//..." [Jim Jagielski]

Modified: httpd/httpd/branches/2.4.x/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/mpm/prefork/prefork.c?rev=1393382&r1=1393381&r2=1393382&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/mpm/prefork/prefork.c (original)
+++ httpd/httpd/branches/2.4.x/server/mpm/prefork/prefork.c Wed Oct  3 10:03:32 2012
@@ -564,9 +564,16 @@ 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");
-            clean_child_exit(APEXIT_CHILDSICK);
+            /* 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);
+            }
+            clean_child_exit(0);
         }
 
         lr->accept_func = ap_unixd_accept;