Re: Redirector problem

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 20 Jun 2001 14:05:12 +0200

Jens-Peter wrote:

> Do you know anything about, how Squid terminated the redirectors? We
> start 10 redirectors at a time, and after some time (days/week) we can
> see 20 redirectors running. 10 of them is using approx 10% CPU each. We
> have an idea, that the redirector should have been shut down, but does
> not handle the right signal. The "zombie" redirector is just looping,
> trying to read from the stdin.

Squid terminates the helpers by closing the channel used to write things
to the helper (i.e. the helpers stdin).

Ah, reading your program I see that you do not handle this at all. The
loop should read

   while(fgets(....) != NULL) {
     process_data...
     print_result...
   }

--
Henrik Nordstrom
Squid Hacker
Received on Wed Jun 20 2001 - 06:08:30 MDT

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