[squid-dev] [PATCH] BUg 4466: removal of -k kill command

Alex Rousskov rousskov at measurement-factory.com
Tue Mar 29 17:22:49 UTC 2016


On 03/29/2016 10:22 AM, Amos Jeffries wrote:
> The Squid "-k kill" command line option is equivalent to "kill -9" on
> whatever process has its PID in the .pid file.

This is how "-k kill" is implemented, but this is not what it is meant
to do IMO.


> Since Squid gained multi-process SMP support it has been declining in
> usefulness, and with recent changes to make thee master process be the
> one operating the .pid file this command has effectively become irrelevant.

I agree that it is not useful in its current implementation but its
intended use case is still valid IMO.


> Since admin have the "kill -9" command available anyway and also have
> better understanding of what will happen when using that command I
> propose removing "squid -k kill" entirely.

The decision logic seems flawed to me because the same logic applies to
most other signal-based commands -- they are just wrappers around a
"kill -X" loop. AFAICT, two things make those -k commands useful:

  1. Squid propagates the -k command to the right kids.
  2. The -k command names and their meaning are Squid-specific and,
     hence, stable across all deployment environments.

IMHO, "-k kill" is meant to kill all Squid processes ASAP, bypassing any
shutdown procedure. We know that the current implementation does not do
that and that it is difficult to implement the right thing. However, if
we are to remove this option, it would be because we refuse to implement
what is difficult, not because the option is no longer needed or is
irrelevant.

If you insist on removal, I cannot object to it because the current
implementation is broken. It would be better to fix it though.


HTH,

Alex.



More information about the squid-dev mailing list