Re: [squid-users] Squid dumps everytime i restart

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 27 Sep 2001 10:48:45 +0200

Ah, now I get what you are asking for. A syncronous "squid -k shutdown"
command that waits until Squid is actually shut down.

Very much true, and should not be too hard to add. Just wait until the
pid (actual pid, not the pidfile) is gone.

Something like the following

pid=`cat /usr/local/squid/logs/squid.pid`
/usr/local/squid/bin/squid -k shutdown
timeout=300
while kill -0 $pid 2>/dev/null && [ $timeout ]; do
    timeout=`expr $timeout - 1`
    sleep 1
done

Adding a C equivalence of this to the "squid -k shutdown" command should
be quite trivial.

Regards
Henrik Nordstrom
Squid Hacker

Marc Elsen wrote:

> Quite true, Hendrik, sorry I am not on the list for the moment,
> too much 'inbox' overhead ; yet I feel that one of the more intersting
> options to squid would be :
>
> -sync_shutdown.
>
> Meaning that the parent would wait untill the child finished off
> completely.
> I would find this very usefull in system shutdown scripts/tools.
>
> Marc.
>
> --
>
> 'Love is truth without any future.
> (M.E. 1997)
Received on Thu Sep 27 2001 - 03:43:06 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:30 MST