From 536d252495bd0ad18dd0f71c25bd56ed9a91ae3d Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Thu, 22 Jun 2000 16:55:01 +0000 Subject: [PATCH] Remove a few unnecessary calls to select. These calls used to be made so that we would sleep for a specified number of microseconds. APR provides a function ap_sleep that does this for us. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85657 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm_common.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/server/mpm_common.c b/server/mpm_common.c index cb73a5c9a2..f471448ba1 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -95,7 +95,6 @@ void ap_reclaim_child_processes(int terminate) { int i; long int waittime = 1024 * 16; /* in usecs */ - struct timeval tv; ap_status_t waitret; int tries; int not_dead_yet; @@ -110,10 +109,8 @@ void ap_reclaim_child_processes(int terminate) * necessary, but we need to allow children a few moments to exit. * Set delay with an exponential backoff. */ - tv.tv_sec = waittime / 1000000; - tv.tv_usec = waittime % 1000000; waittime = waittime * 4; - ap_select(0, NULL, NULL, NULL, &tv); + ap_sleep(waittime); /* now see who is done */ not_dead_yet = 0; @@ -203,7 +200,6 @@ static int wait_or_timeout_counter; void ap_wait_or_timeout(ap_wait_t *status, ap_proc_t *ret, ap_pool_t *p) { - struct timeval tv; ap_status_t rv; ++wait_or_timeout_counter; @@ -226,9 +222,7 @@ void ap_wait_or_timeout(ap_wait_t *status, ap_proc_t *ret, ap_pool_t *p) return; } #endif - tv.tv_sec = SCOREBOARD_MAINTENANCE_INTERVAL / 1000000; - tv.tv_usec = SCOREBOARD_MAINTENANCE_INTERVAL % 1000000; - ap_select(0, NULL, NULL, NULL, &tv); + ap_sleep(SCOREBOARD_MAINTENANCE_INTERVAL); ret->pid = -1; return; } -- 2.50.1