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:
parent
f89fe20dde
commit
0384c2abd7
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user