From c1f725340d82dfc56f7b2e02b5310ac8ecce6f95 Mon Sep 17 00:00:00 2001 From: Jonas Johansson Date: Thu, 19 May 2016 13:39:56 +0200 Subject: [PATCH] plugin/pidfile: also notify on modified pidfiles Signed-off-by: Jonas Johansson --- plugins/pidfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/pidfile.c b/plugins/pidfile.c index f9db3126..497a5fe4 100644 --- a/plugins/pidfile.c +++ b/plugins/pidfile.c @@ -47,7 +47,7 @@ static void pidfile_callback(void *UNUSED(arg), int fd, int UNUSED(events)) _d("%s: match %s", basename, svc->cmd); snprintf(cond, sizeof(cond), "svc%s", svc->cmd); - if (ev->mask & (IN_CREATE | IN_ATTRIB)) { + if (ev->mask & (IN_CREATE | IN_ATTRIB | IN_MODIFY)) { svc_started(svc); cond_set(cond); } else if (ev->mask & IN_DELETE) @@ -81,7 +81,7 @@ static void pidfile_init(void *arg) struct context *ctx = arg; ctx->wd = inotify_add_watch(ctx->fd, _PATH_VARRUN, - IN_CREATE | IN_ATTRIB | IN_DELETE); + IN_CREATE | IN_ATTRIB | IN_DELETE | IN_MODIFY); if (ctx->wd < 0) { _pe("inotify_add_watch()"); close(ctx->fd);