Messages in this thread | | | Date | Sat, 26 Jun 1999 20:11:26 +0100 (BST) | From | Dale Amon <> | Subject | Re: VFS event hooks |
| |
On Sat, 26 Jun 1999, Linus Torvalds wrote:
> This is what "poll" is for: it would not be overly hard to add a new > POLL_XXX type that says "the underlying data has changed", and make > directories and regular files honour that. > > I would refuse to add some new mechanism when poll() fits the bill so well > (you can't use select() or any of the existing poll flags, because they > have specified behaviour). > > Linus >
By my reading it might not work. Just because an Icon is displayed on a desktop or a file shows up in a Workspace Manager with properties doesn't mean you actually have an open fd for it. I'm not sure of the answer: I think a lot of GUI's just simply punt and refresh at a time interval rather than have an event sent to them by the OS.
I have no religion in the matter, but what seems most useful to me is a mechanism by which I give the OS a list of file names for which I want to be notified if anything changes: or perhaps even an "ALL" if I'm doing some as yet to be imagined system monitor. The app then recieves an event that names the changed object and possibly what changed.
That would mean that your file browser would instantly change to show a file deletion, even if the deletion was done by a different user on command line login. Even on the NeXT it could be several minutes before a change like that was detected. I don't think file browsers have open fd's on all files showing, but on the other hand perhaps with the change information passed up through the directory tree the app could open an fd on the root directory and simply poll that.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |