diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2007-05-18 09:38:32 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2007-05-18 09:38:32 +0200 |
commit | 376572fcf2019d186186e1503ddf23d5aef285c1 (patch) | |
tree | a27b0ad15061f0b0e2a5cfef06ec1089ba7ce647 | |
parent | aa67658f453ea0b6cb558bb71b84cb71a865d433 (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.
-rw-r--r-- | inotail.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } } |