bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tail: add comments noting potential inotify-related problems


From: Giuseppe Scrivano
Subject: Re: [PATCH] tail: add comments noting potential inotify-related problems
Date: Fri, 03 Jul 2009 19:55:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (gnu/linux)

Hi Jim,

Jim Meyering <address@hidden> writes:


> I don't (yet?) see why a tree would be the preferred data structure.
>
> ...
Because inotify doesn't add recursive watchers.  For example, you want
to follow by name `/var/foo/bar', and `/var/foo' doesn't exist yet.  To
catch the event for the `bar' file creation, you will need to register a
watcher on the /var directory and when the foo subdirectory is created
finally watch the file.

Since different files in different directories can be watched, I thought
to use a tree to propagate events to children nodes.

Though, if you prefer a hash table, approximately the same mechanism can
be adapted without problems.

Regards,
Giuseppe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]