Do not create PID conditions for services that do not support it

Follow-up to issue #386

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-11-13 04:37:03 +01:00
1 parent 47b0d4cccf
commit 66020f48ea
2 files changed
+9 -5

No files matched your search

+4
View File
@@ -80,6 +80,10 @@ static void pidfile_update_conds(char *dir, char *name, uint32_t mask)
}
dbg("Found svc %s for %s with pid %d", svc_ident(svc, NULL, 0), fn, svc->pid);
if (svc->notify != SVC_NOTIFY_PID) {
dbg("svc %s does not use PID readiness notification, skipping.", svc_ident(svc, NULL, 0));
return;
}
mkcond(svc, cond, sizeof(cond));
if (mask & (IN_CLOSE_WRITE | IN_ATTRIB | IN_MODIFY | IN_MOVED_TO)) {