Track run/tasks, should run at least once per declared runlevel

This patch adds a 'once' counter to the svc_t for run/task jobs.  This
counter is incremented when Finit calls service_start() and is reset on
runlevel changes.

Also, at the end of a runlevel each run/task have their state reset to
SVC_HALTED_STATE so they can be launched again for the new runlevel, if
so declared.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-12-13 17:58:48 +01:00
1 parent 5117b723c2
commit 3c015f384d
4 files changed
+31 -2

No files matched your search

+1
View File
@@ -31,6 +31,7 @@ void service_runlevel (int newlevel);
int service_register (int type, char *line, struct rlimit rlimit[], struct timeval *mtime);
void service_unregister (svc_t *svc);
void service_runtask_clean (void);
void service_reload_dynamic (void);
void service_step (svc_t *svc);