httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1629918 - in /httpd/httpd/trunk/server/mpm: event/event.c eventopt/eventopt.c prefork/prefork.c worker/worker.c
Date Tue, 07 Oct 2014 15:46:05 GMT
Author: ylavic
Date: Tue Oct  7 15:46:05 2014
New Revision: 1629918

URL: http://svn.apache.org/r1629918
Log:
mpms: enforce assertion that unreachable code is not reached.

Modified:
    httpd/httpd/trunk/server/mpm/event/event.c
    httpd/httpd/trunk/server/mpm/eventopt/eventopt.c
    httpd/httpd/trunk/server/mpm/prefork/prefork.c
    httpd/httpd/trunk/server/mpm/worker/worker.c

Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1629918&r1=1629917&r2=1629918&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Tue Oct  7 15:46:05 2014
@@ -2604,6 +2604,8 @@ static int make_child(server_rec * s, in
         event_note_child_started(slot, getpid());
         child_main(0, 0);
         /* NOTREACHED */
+        ap_assert(0);
+        return -1;
     }
 
     if ((pid = fork()) == -1) {
@@ -2642,8 +2644,10 @@ static int make_child(server_rec * s, in
         apr_signal(SIGTERM, just_die);
         child_main(slot, bucket);
         /* NOTREACHED */
+        ap_assert(0);
+        return -1;
     }
-    /* else */
+
     if (ap_scoreboard_image->parent[slot].pid != 0) {
         /* This new child process is squatting on the scoreboard
          * entry owned by an exiting child process, which cannot

Modified: httpd/httpd/trunk/server/mpm/eventopt/eventopt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/eventopt/eventopt.c?rev=1629918&r1=1629917&r2=1629918&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/eventopt/eventopt.c (original)
+++ httpd/httpd/trunk/server/mpm/eventopt/eventopt.c Tue Oct  7 15:46:05 2014
@@ -2426,6 +2426,8 @@ static int make_child(server_rec * s, in
         event_note_child_started(slot, getpid());
         child_main(0, 0);
         /* NOTREACHED */
+        ap_assert(0);
+        return -1;
     }
 
     if ((pid = fork()) == -1) {
@@ -2464,8 +2466,10 @@ static int make_child(server_rec * s, in
         apr_signal(SIGTERM, just_die);
         child_main(slot, bucket);
         /* NOTREACHED */
+        ap_assert(0);
+        return -1;
     }
-    /* else */
+
     if (ap_scoreboard_image->parent[slot].pid != 0) {
         /* This new child process is squatting on the scoreboard
          * entry owned by an exiting child process, which cannot

Modified: httpd/httpd/trunk/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/prefork/prefork.c?rev=1629918&r1=1629917&r2=1629918&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/prefork/prefork.c (original)
+++ httpd/httpd/trunk/server/mpm/prefork/prefork.c Tue Oct  7 15:46:05 2014
@@ -772,6 +772,8 @@ static int make_child(server_rec *s, int
         prefork_note_child_started(slot, getpid());
         child_main(slot, bucket);
         /* NOTREACHED */
+        ap_assert(0);
+        return -1;
     }
 
     (void) ap_update_child_status_from_indexes(slot, 0, SERVER_STARTING,

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=1629918&r1=1629917&r2=1629918&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Tue Oct  7 15:46:05 2014
@@ -1415,6 +1415,8 @@ static int make_child(server_rec *s, int
         worker_note_child_started(slot, getpid());
         child_main(0, 0);
         /* NOTREACHED */
+        ap_assert(0);
+        return -1;
     }
 
     if ((pid = fork()) == -1) {
@@ -1452,8 +1454,10 @@ static int make_child(server_rec *s, int
         apr_signal(SIGTERM, just_die);
         child_main(slot, bucket);
         /* NOTREACHED */
+        ap_assert(0);
+        return -1;
     }
-    /* else */
+
     if (ap_scoreboard_image->parent[slot].pid != 0) {
         /* This new child process is squatting on the scoreboard
          * entry owned by an exiting child process, which cannot



Mime
View raw message