From 0384c2abd7cc7fa768bb2c2260728f041ac71c47 Mon Sep 17 00:00:00 2001
From: "C. McEnroe" <june@causal.agency>
Date: Mon, 1 Mar 2021 19:09:40 -0500
Subject: 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.
---
 catsit-watch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catsit-watch.c b/catsit-watch.c
index 78d1cb2..096449b 100644
--- a/catsit-watch.c
+++ b/catsit-watch.c
@@ -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(
-- 
cgit 1.4.1