Greatly simplify svc hook for external plugins

This commit removes a lot of unnecessary overhead for handling external
service plugins.  Instead of traversing the plugin array every time a
service callback should run we set the plugin callback in the svc_t when
the plugin is registered.

Also, make sure to check for norespawn/SIGSTOP in svc_reload() as well.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2012-10-02 06:39:26 +02:00
1 parent f55f68d032
commit 5116cd66ef
5 files changed
+44 -67

No files matched your search

+5 -6
View File
@@ -28,13 +28,12 @@
#include "svc.h"
#include "plugin.h"
void svc_start_all (void);
void svc_monitor (void);
void svc_start_all (void);
void svc_monitor (void);
void plugin_run_hooks (hook_point_t no);
svc_cmd_t plugin_svc_enabled (svc_t *svc, int event, void *arg);
int plugin_load_all (char *path);
void plugin_monitor (void);
void plugin_run_hooks (hook_point_t no);
int plugin_load_all (char *path);
void plugin_monitor (void);
#endif /* FINIT_PRIVATE_H_ */