From 376572fcf2019d186186e1503ddf23d5aef285c1 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 18 May 2007 09:38:32 +0200 Subject: 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. --- inotail.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- cgit v1.2.3-54-g00ecf