diff options
author | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-08-13 18:06:41 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-08-13 18:06:41 +0200 |
commit | 2e402599bfb4c4e97a8f6f8b0910783c7a693aaf (patch) | |
tree | 40fd6943f67791ec5a71a905be65f7611aa55907 | |
parent | f4384fef0cc053417948713b3202262c264c4268 (diff) |
Alos check for fd when adding watch to file.
-rw-r--r-- | inotail.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -199,7 +199,7 @@ static int watch_files(struct file_struct *f, int n_files) /* Which file has produced the event? */ for (i = 0; i < n_files; i++) { - if (!f[i].ignore && f[i].i_watch == inev->wd) { + if (!f[i].ignore && f[i].fd >= 0 && f[i].i_watch == inev->wd) { fil = &f[i]; break; } |