]> granicus.if.org Git - apache/commitdiff
Need to report a select() error vs a timeout. Also avoid hogging the CPU on
authorBradley Nicholes <bnicholes@apache.org>
Wed, 26 Mar 2003 19:21:32 +0000 (19:21 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Wed, 26 Mar 2003 19:21:32 +0000 (19:21 +0000)
an error.

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

server/mpm/netware/mpm_netware.c

index db5cc5d9a64447da854155b678cc993bfb761205..3353d4c421d40af08cbf3ed6dcd390a5d1051669 100644 (file)
@@ -418,8 +418,14 @@ void worker_main(void *arg)
             memcpy(&main_fds, &listenfds, sizeof(fd_set));
             srv = select(listenmaxfd + 1, &main_fds, NULL, NULL, &tv);
 
-            if (srv <= 0)
+            if (srv <= 0) {
+                if (srv < 0) {
+                    ap_log_error(APLOG_MARK, APLOG_NOTICE, apr_get_netos_error(), ap_server_conf,
+                        "select() failed on listen socket");
+                    apr_thread_yield();
+                }
                 continue;
+            }
 
             /* remember the last_lr we searched last time around so that
             we don't end up starving any particular listening socket */