Skip to content

Commit 1275f05

Browse files
committed
devmon: add error checking to callback
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 61a92aa commit 1275f05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/devmon.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ static void devmon_cb(uev_t *w, void *arg, int events)
211211

212212
(void)arg;
213213

214+
if (UEV_ERROR == events) {
215+
errx(1, "Unrecoverable error in devmon watcher");
216+
return;
217+
}
218+
214219
sz = read(w->fd, ev_buf, sizeof(ev_buf) - 1);
215220
if (sz <= 0) {
216221
err(1, "invalid inotify event");

0 commit comments

Comments
 (0)