Exit with EX_TEMPFAIL when watching files

Reason being that if a file disappears and it takes longer for it
to reappear than the default restart interval, the service would
just get stopped. Treat an initially missing file the same as a
file that gets deleted.
This commit is contained in:
C. McEnroe 2021-03-01 19:09:40 -05:00
parent f89fe20dde
commit 0384c2abd7

View File

@ -29,7 +29,7 @@
static void watch(int kq, char *path) {
int fd = open(path, O_RDONLY | O_CLOEXEC);
if (fd < 0) err(EX_NOINPUT, "%s", path);
if (fd < 0) err(EX_TEMPFAIL, "%s", path);
struct kevent event;
EV_SET(