Re: Making start/stop idempotent

From: Robert Collins <robertc_at_robertcollins.net>
Date: Tue, 12 Aug 2008 14:49:30 +1000

On Tue, 2008-08-12 at 14:43 +1000, Mark Nottingham wrote:
> Our management tools like processes to be idempotent; i.e., you should
> be able to start or stop a process any number of times without it
> throwing an error.
>
> Currently, Squid will return 1 if a squid process is already running
> (upon start) and when there isn't one (upon -k shutdown).
>
> I'm writing a patch to change this behaviour, and the most reasonable
> way to do it seems to be with a command-line option; I've somewhat
> arbitrarily chosen -p.
>
> Does this seem reasonable? If so, I'll submit a patch shortly.

I would be happy with not needing an option to have idempotent
start-and-stop behaviour; we could use an option to preserve the current
behaviour (though that doesn't seem particularly useful).

-Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Received on Tue Aug 12 2008 - 04:49:11 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 12 2008 - 12:00:04 MDT