From: Ben Laurie Date: Sun, 25 Jul 1999 14:03:16 +0000 (+0000) Subject: Make sure we terminate. X-Git-Tag: 1.3.7~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0485394662a6409d4383282993314827168b3e38;p=apache Make sure we terminate. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83503 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index dfc68b0df6..57230a7bef 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -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;