summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoshiyuki Asaba2008-02-19 04:28:23 +0000
committerYoshiyuki Asaba2008-02-19 04:28:23 +0000
commit26b23824373c026df93fe1d2bee705c8dad13355 (patch)
tree9778a0f47a12fde80a4f2bf60b25e12a7eacb218
parent6025c149208e7854c9ed701ce848c15fa807ceaf (diff)
Polling signals per 3 secs when health check is disabled.
-rw-r--r--main.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/main.c b/main.c
index 25958c3..295fa3f 100644
--- a/main.c
+++ b/main.c
@@ -399,9 +399,10 @@ int main(int argc, char **argv)
for (;;)
{
int r;
+ struct timeval t = {3, 0};
POOL_SETMASK(&UnBlockSig);
- r = pool_pause(NULL);
+ r = pool_pause(&t);
POOL_SETMASK(&BlockSig);
if (r > 0)
break;
@@ -1041,17 +1042,12 @@ static void reaper(void)
int i;
pool_debug("reap_handler called");
- sigchld_request = 0;
-
- if (exiting)
- {
- return;
- }
- if (switching)
+ if (exiting || switching)
{
return;
}
+ sigchld_request = 0;
#ifdef HAVE_WAITPID
while ((pid = waitpid(-1, &status, WNOHANG)) > 0)