mirror of
https://github.com/troglobit/finit.git
synced 2026-09-30 21:13:01 +07:00
Merge pull request #435 from aanderse/master
This commit is contained in:
+2
-2
@@ -2912,7 +2912,7 @@ void service_notify_cb(uev_t *w, void *arg, int events)
|
|||||||
}
|
}
|
||||||
|
|
||||||
len = read(w->fd, buf, sizeof(buf) - 1);
|
len = read(w->fd, buf, sizeof(buf) - 1);
|
||||||
if (len == -1) {
|
if (len <= 0) {
|
||||||
warn("Failed reading notification from %s", svc_ident(svc, NULL, 0));
|
warn("Failed reading notification from %s", svc_ident(svc, NULL, 0));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2920,7 +2920,7 @@ void service_notify_cb(uev_t *w, void *arg, int events)
|
|||||||
buf[len] = 0;
|
buf[len] = 0;
|
||||||
|
|
||||||
/* systemd and s6, respectively. The latter then closes the socket */
|
/* systemd and s6, respectively. The latter then closes the socket */
|
||||||
if (!strcmp(buf, "READY=1\n") || !strcmp(buf, "\n")) {
|
if (!strcmp(buf, "READY=1\n") || buf[len - 1] == '\n') {
|
||||||
/*
|
/*
|
||||||
* native (pidfile) services are marked as started by
|
* native (pidfile) services are marked as started by
|
||||||
* the pidfile plugin.
|
* the pidfile plugin.
|
||||||
|
|||||||
Reference in New Issue
Block a user