summaryrefslogtreecommitdiff
path: root/inotail.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2007-05-18 09:38:32 +0200
committerTobias Klauser <tklauser@xenon.tklauser.home>2007-05-18 09:38:32 +0200
commit376572fcf2019d186186e1503ddf23d5aef285c1 (patch)
treea27b0ad15061f0b0e2a5cfef06ec1089ba7ce647 /inotail.c
parentaa67658f453ea0b6cb558bb71b84cb71a865d433 (diff)
inotail.c: Forward just one event, we might miss some events otherwise
INOTIFY_BUFLEN is defined as 4 times the size of an event, so we would skip some events. Though I've never seen a case where more than one event arrived at a time.
Diffstat (limited to 'inotail.c')
-rw-r--r--inotail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/inotail.c b/inotail.c
index 6f8be7c..0187da7 100644
--- a/inotail.c
+++ b/inotail.c
@@ -388,7 +388,8 @@ static int watch_files(struct file_struct *files, int n_files)
if (handle_inotify_event(inev, f) < 0)
break;
- ev_idx += INOTIFY_BUFLEN + inev->len;
+
+ ev_idx += sizeof(struct inotify_event) + inev->len;
}
}