summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2006-12-23 15:03:32 +0100
committerTobias Klauser <tklauser@xenon.tklauser.home>2006-12-23 15:03:32 +0100
commit98a70bca236328e23db2b13b531ab9202c93b2ca (patch)
treed368c8e1475a35e4abf176a3dff60d2f29b2b1a3
parent1ddefac3dfe654f23fc944df5d7c52a078692012 (diff)
inotail.c: Keep tailing moved files by fd
As a side effect of the recent change to not reopen files while watching (commit 1ddefac3dfe654f23fc944df5d7c52a078692012) it's possible now to follow moved files by their open fd.
-rw-r--r--inotail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/inotail.c b/inotail.c
index 1cb29f6..5e98ebd 100644
--- a/inotail.c
+++ b/inotail.c
@@ -305,8 +305,8 @@ static int handle_inotify_event(struct inotify_event *inev, struct file_struct *
} else if (inev->mask & IN_DELETE_SELF) {
fprintf(stderr, "File '%s' deleted.\n", fil->name);
} else if (inev->mask & IN_MOVE_SELF) {
- /* TODO: Try to follow file/fd */
fprintf(stderr, "File '%s' moved.\n", fil->name);
+ return n_ignored;
} else if (inev->mask & IN_UNMOUNT) {
fprintf(stderr, "Device containing file '%s' unmounted.\n", fil->name);
}