mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00:00
Clean up bootstrap-only tasks when leaving bootstrap 'S' runlevel
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
8df2b7b6e9
commit
b4ccc8b008
4 files changed
+26
-3
No files matched your search
@@ -359,6 +359,24 @@ void svc_clean_dynamic(void (*cb)(svc_t *))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* svc_clean_bootstrap - Remove bootstrap-only services after boot
|
||||
* @svc: Pointer to &svc_t object
|
||||
*
|
||||
* Returns:
|
||||
* %TRUE(1) if object was bootstrap-only, otherwise %FALSE(0)
|
||||
*/
|
||||
int svc_clean_bootstrap(svc_t *svc)
|
||||
{
|
||||
if (!ISOTHER(svc->runlevels, 0)) {
|
||||
svc->pid = 0;
|
||||
svc_del(svc);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *svc_status(svc_t *svc)
|
||||
{
|
||||
if (svc->pid)
|
||||
|
||||
Reference in new issue
Block a user