mirror of
https://github.com/troglobit/finit.git
synced 2026-10-29 12:40:44 +00:00
Add HOOK_SVC_LOST to detect lost processes
This patch adds support for the runtime `HOOK_SVC_LOST` and the (very noisy) *example* plugin `lost.so`. Customer request. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e54c7eef65
commit
3f3220e806
7 files changed
+90
-7
No files matched your search
@@ -480,6 +480,9 @@ For your convenience a set of *optional* plugins are available:
|
||||
|
||||
* *initctl.so*: Extends finit with a traditional `initctl` functionality.
|
||||
|
||||
* *lost.so*: Very simple `HOOK_SVC_LOST` example. Logs process ID and
|
||||
name to syslog.
|
||||
|
||||
* *netlink.so*: Listens to Linux kernel Netlink events for gateway and
|
||||
interfaces. These events are then sent to the Finit service monitor
|
||||
for services that may want to be SIGHUP'ed on new default route or
|
||||
@@ -527,6 +530,14 @@ state, etc. Available hook points are:
|
||||
all modified/removed services have been stopped. When the hook has
|
||||
completed, Finit continues to start all modified and new services.
|
||||
|
||||
* `HOOK_SVC_LOST`: Called when a process is lost. When reconfiguring
|
||||
services at runtime this hook may be called a lot. However, it may be
|
||||
a quite useful hook to monitor a system post bootstrap when no, or
|
||||
few, services are expected to exit. A default plugin `lost.so` is
|
||||
available in the `plugins/` subdirectory as an example.
|
||||
|
||||
**NOTE:** This hook callback gets the lost PID as argument.
|
||||
|
||||
* `HOOK_RUNLEVEL_CHANGE`: Called when the user has issued a runlevel
|
||||
change. The hook is called when services not matching the new
|
||||
runlevel have been been stopped. When the hook has completed, Finit
|
||||
|
||||
Reference in new issue
Block a user