Re: [squid-users] Terminating a service(ecap content adaptation) which is intiated by squid at time of squid shutdown

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 07 Jun 2014 19:10:22 +1200

On 6/06/2014 3:57 p.m., joseph_jose wrote:
> i have configured squid with ecap content adaptation(enable_ecap on) which in
> turn calls Adapter::Service::start() of libecap when squid starts.
> Similarly i want to call Adapter::Service::start() of libecap when squid is
> terminating. Because i am using Adapter::Service::start() of libecap to
> shutdown some services and free memory etc.
> But squid is shutting down directly.
> Is there any specific configuration directives which i can use in squid.conf
> to tell squid what all things it have to do before shutting down?
>
> (scenario is like below)
> i have written a simple code for generating a text file in both
> Adapter::Service::start() and Adapter::Service::start(). The text file from
> service::start() is generating when squid loads.. but text file from
> Adapter::Service::start() is not generated when squid shutdowns.
>

It makes no sense to be using something calld start() to perform
shutdown/stop oeprations.

The eCAP stop() method is perhapse better, although that is documented
as only being stop until a further start() is called so not a full shutdown.

The retire() method seems to be another option although I dont quite
understand its documentation myself. There is also the two configuration
methods. It may make sense to reallocate or release unnecessary memory
when finishing a reconfiguration.

NP: I cant find any explicit eCAP closure code in Squid. Perhapse the
object destructor is the best place for shutdown cleanup.

Amos
Received on Sat Jun 07 2014 - 07:10:34 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 09 2014 - 12:00:04 MDT