diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2000-12-08 03:35:07 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2000-12-08 03:35:07 +0000 |
commit | 00512087777a60f77799263d6e9f77f1e47eb7a1 (patch) | |
tree | 1aa81e50ab88143d56017a75c9c234bb05015307 /src/tinyproxy.c | |
parent | 068b0337c5d68e26206438951334993dbf2393bf (diff) |
Fixed a problem with polling for the number of active threads. No longer
polls. :)
Diffstat (limited to 'src/tinyproxy.c')
-rw-r--r-- | src/tinyproxy.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tinyproxy.c b/src/tinyproxy.c index 30e5735..e0363d1 100644 --- a/src/tinyproxy.c +++ b/src/tinyproxy.c @@ -1,4 +1,4 @@ -/* $Id: tinyproxy.c,v 1.7 2000-11-23 04:46:48 rjkaes Exp $ +/* $Id: tinyproxy.c,v 1.8 2000-12-08 03:35:07 rjkaes Exp $ * * The initialise routine. Basically sets up all the initial stuff (logfile, * listening socket, config options, etc.) and then sits there and loops @@ -82,6 +82,7 @@ void takesig(int sig) log(LOG_INFO, "SIGTERM received."); break; } + if (sig != SIGTERM) signal(sig, takesig); signal(SIGPIPE, SIG_IGN); @@ -326,7 +327,10 @@ int main(int argc, char **argv) * Start the main loop. */ log(LOG_INFO, "Starting main loop. Accepting connections."); - thread_main_loop(); + do { + thread_main_loop(); + sleep(1); + } while (!config.quit); log(LOG_INFO, "Shutting down."); thread_close_sock(); |