I know you can model a service in s6, which watches another service and kills it, so in fact the problem is solved outside of s6. But I wanted to ask to develop a feature to get a simple way to model that within s6. Usually it's good enough to call a external command with a timeout and watches exit code.
Hi Oliver, The s6-idiomatic way of doing it would be, as you say, to have a separate service that calls an external command (the health checker, which is daemon-specific) with a timeout and watches the exit code. It is trivial to do in shell, which is why I haven't written any particular binary for that. I could add a program that does it for you so you don't have to write a 3-line shell script, and a command that creates a s6 service directory (or even a s6-rc source definition directory) that watches another service using the aforementioned program, it would not be hard. However, I am concerned about scope creep, and a common criticism I hear from distros is that s6 is "too big" - which is unfair considering that integrated init systems providing the same level of functionality are 5x-10x bigger, but is really a way of saying that there are a lot of exposed binaries with miscellaneous functionality and it's difficult to wrap one's head around it. So I'm trying not to add to the problem, and the direction I'm going these days is more towards integration and high-level management than towards adding building blocks to help with various tasks, so if something is doable with a bit of scripting, then I'd rather let users do it that way. I'm pretty sure that people in the community already have run script models for healthchecker services, if they could contribute them it would be awesome ;) -- Laurent