Re: detect service crashes

From: Charlie Brady <charlieb-supervision_at_budge.apana.org.au>
Date: Fri, 6 Sep 2013 11:34:19 -0400 (EDT)

On Fri, 6 Sep 2013, Alex Efros wrote:

> The services I'm talking about are unusual enough - it's OS Inferno's
> virtual machine (/usr/inferno/Linux/386/bin/emu-g). Thing is, it's
> implemented as multi-thread application, which internally handle exit by
> killing it's group of threads. So, when my application inside Inferno
> crash or raise exception, or even exit normally - any of these events
> result in main Inferno thread send kill-group signal to itself.

That's an infernal application then.

> As result, ./finish script always called with $1=-1 and $2=9 - both when
> service crash and when I manually run `sv t`.

runsv records in the state file when a process has been sent a TERM signal
and it is waiting for it to exit. You'd need to check the source whether
that information is cleared before 'finish' is run.
Received on Fri Sep 06 2013 - 15:34:19 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC