Redirector problem

From: Jens-Peter <jp@dont-contact.us>
Date: Tue, 19 Jun 2001 10:43:02 +0200

Hi all!
 
We have written a small C program that works as a redirector for Squid
2.3 Stable 1.
 
The C program seems to work ok. I basically looks like this:
 
 
void die(int x) {
  quitflag=1;
  exit(0);
}
 
int main(int argc, char **argv) {
  /* Set up signal handlers to quit correctly */
  signal(SIGPIPE, die);
  signal(SIGHUP, die);
 
  while (!quitflag) {
    fgets(st,1024, stdin);
    if (quitflag) exit(0);
            /* handle requests */
  }
  return 0;
}
 
Squid is configured to start 10 redirectors at a time.
The problem is, that I often discover 10 redirectors using approx 10%
CPU each. This makes the proxy very slow, and I guess that the
redirectors are really just looping. What has happened here? Did Squid
in someway try to shut down the redirectors with another signal?
 
Any clues would be appreciated!
 
Best regards,
 
Jens-Peter Vraa Jensen
Received on Tue Jun 19 2001 - 02:49:27 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:04 MST