mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
Remove HOOK_SVC_START, caused more problems than it was worth
An operator wanting to monitor processes started by Finit could use the kernel ftrace framework. E.g. execsnoop in perf-tools. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
9516c28a8a
commit
a5491b3ded
4 files changed
+4
-37
No files matched your search
@@ -192,16 +192,8 @@ int plugin_exists(hook_point_t no)
|
||||
/* Some hooks are called with a fixed argument, like HOOK_SVC_LOST */
|
||||
void plugin_run_hook(hook_point_t no, void *arg)
|
||||
{
|
||||
static int last = -1;
|
||||
plugin_t *p, *tmp;
|
||||
|
||||
/*
|
||||
* End recursion: any plugin hook => start service => SVC start
|
||||
* hook => start service ... err ... wait a second
|
||||
*/
|
||||
if (HOOK_SVC_START == last)
|
||||
return;
|
||||
|
||||
PLUGIN_ITERATOR(p, tmp) {
|
||||
if (p->hook[no].cb) {
|
||||
_d("Calling %s hook n:o %d (arg: %p) ...", basename(p->name), no, arg);
|
||||
@@ -209,15 +201,8 @@ void plugin_run_hook(hook_point_t no, void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
/* Guard against infinite recursion */
|
||||
if (HOOK_SVC_START == no)
|
||||
last = no;
|
||||
|
||||
cond_set_oneshot(hook_cond[no]);
|
||||
service_step_all(SVC_TYPE_RUNTASK);
|
||||
|
||||
if (HOOK_SVC_START == no)
|
||||
last = -1;
|
||||
}
|
||||
|
||||
/* Regular hooks are called with the registered plugin's argument */
|
||||
|
||||
Reference in new issue
Block a user