Bug#742783: init script kills all asterisk processes on a machine
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Sun Mar 30 14:37:02 UTC 2014
On Sat, Mar 29, 2014 at 05:11:02PM +0100, Jeremy Lainé wrote:
> On 03/29/2014 03:59 PM, Jonas Smedegaard wrote:
> > I believe actually that this is an RC bug - Policy §9.3.2 says this:
> >> The `init.d' scripts must ensure that they will behave sensibly (i.e.,
> >> returning success and not starting multiple copies of a service) if
> >> invoked with `start' when the service is already running, or with
> >> `stop' when it isn't, and that they don't kill unfortunately-named
> >> user processes. The best way to achieve this is usually to use
> >> `start-stop-daemon' with the `--oknodo' option.
> > I.e. init script *must* play nice with other processes with same name!
> >
Also note that we have a PID file. But it probably turned out to be not
reliable enought to be used there. I don't remember why. And yes, I'm
aware of a certain alternative that shall not be named :-).
>
> OK for the motivation part, though I'd still like to hear what Daniel's usecase is.
>
> As to "how to fix it":
>
> - for asterisk itself we can probably rely on the PID file
>
> - for asterisk canary, there is unfortunately no PID file
Asterisk should normally just kill the canary on a normal run. It will
only be a problem with SIGKILL.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com
More information about the Pkg-voip-maintainers
mailing list