From cecbae314bd38105f5d66cfb45ada450dd17b533 Mon Sep 17 00:00:00 2001 From: Bradley Nicholes Date: Wed, 26 Mar 2003 19:21:32 +0000 Subject: [PATCH] Need to report a select() error vs a timeout. Also avoid hogging the CPU on 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/mpm/netware/mpm_netware.c b/server/mpm/netware/mpm_netware.c index db5cc5d9a6..3353d4c421 100644 --- a/server/mpm/netware/mpm_netware.c +++ b/server/mpm/netware/mpm_netware.c @@ -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 */ -- 2.40.0