]> granicus.if.org Git - apache/commitdiff
Make sure we terminate.
authorBen Laurie <ben@apache.org>
Sun, 25 Jul 1999 14:03:16 +0000 (14:03 +0000)
committerBen Laurie <ben@apache.org>
Sun, 25 Jul 1999 14:03:16 +0000 (14:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83503 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/prefork/prefork.c

index dfc68b0df615de7e2e9c8c9a33a81b3b0e415ca1..57230a7bef198cdd58995e5938c162a5896f138f 100644 (file)
@@ -2160,17 +2160,21 @@ static void child_main(int child_num_arg)
                }
                else {
                    lr = last_lr->next;
+                   if (!lr)
+                       lr = ap_listeners;
                }
                first_lr=lr;
                do {
-                   if (!lr) {
-                       lr = ap_listeners;
-                   }
                    if (FD_ISSET(lr->fd, &main_fds))
                        goto got_listener;
                    lr = lr->next;
+                   if (!lr)
+                       lr = ap_listeners;
                }
                while (lr != first_lr);
+               /* FIXME: if we get here, something bad has happened, and we're
+                  probably gonna spin forever.
+               */
                continue;
        got_listener:
                last_lr = lr;