Fix #185: add devmon support, <dev/foo> condition provider

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2022-12-18 22:21:15 +01:00
1 parent c586204fc1
commit 17c69fef3d
7 files changed
+328 -6

No files matched your search

+7
View File
@@ -43,6 +43,7 @@
#include "client.h"
#include "conf.h"
#include "cond.h"
#include "devmon.h"
#include "finit.h"
#include "helpers.h"
#include "pid.h"
@@ -1696,10 +1697,16 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
*/
void service_unregister(svc_t *svc)
{
char *c;
if (!svc)
return;
service_stop(svc);
for (c = strtok(svc->cond, ","); c; c = strtok(NULL, ","))
devmon_del_cond(c);
svc_del(svc);
}