Re: Bug with RunCache ? (Re: Squid won't release rc.local after it starts)

From: Duane Wessels <wessels@dont-contact.us>
Date: Mon, 12 Oct 1998 16:28:37 -0600

=?iso-8859-1?Q?Lars_Marowsky-Br=E9e?= writes:

>On 1998-10-11T04:01:45,
> Henny Bekker <H.Bekker@accu.uu.nl> said:
>
>> Or use /usr/local/squid/bin/RunCache &
>
>I've upgraded to squid v2 now and encountered a strange problem:
>
>I run squid via RunCache. When I change the configuration files, I send squid
>-HUP. Under v1, this worked just fine - under v2, shorty thereafter, RunCache
>starts to start new squid processes! (While the old one is still running)
>
>The new processes die of course, since the http_port is bound to the already
>running process, RunCache looping forever. What is happening here?

Its safer to use 'squid -kreconfigure'.

The problem here I guess is that I started to make squid itself
behave more like a proper daemon process. The idea is to eventually
make RunCache unnecessary.

If you look closely, you probably see two "squid" processes:

 wessels 20 1221 0 16:25:17 pts/8 0:00 ./squid
 wessels 21 20 78 16:25:18 pts/8 0:02 (squid)

The first is the parent process, the second is the child process.

The child process is the one which does all the work. The parent
waits around for the child to exit, and restarts it if necessary.

you want to HUP the child process not the parent. -kreconfigure will
do the right thing for you.

Also, you might consider changing RunCache to call squid with
the -N command line option:

        squid -sNY $conf >> $logdir/squid.out 2>&1

That starts only one squid process, instead of the parent/child
thing above.

Duane W.
Received on Mon Oct 12 1998 - 15:29:45 MDT

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