Re: strange disk activity [tail -f]

Malcolm Beattie (mbeattie@sable.ox.ac.uk)
Tue, 2 Apr 1996 09:57:17 +0100 (BST)


Ingo Molnar writes:
> might be a stupid question, but is there no way doing event based reads
> on files [selects and/or blocking reads at the end of the file] ?

There was an extension to FFS for "watchdogs" which allowed user-mode
programs to "guard" files and directories. Some spare bytes in the inode
were used to store the name of a guard program (if any) in /wdogs.
The process communicated with the kernel by special message channels and
was allowed to intercept events of interest and then (if desired) modify
them or pass them though unaltered. You could presumably write a program
which intercepted writes at end of file and woke up processes which had
regsistered an interest. Since it requires additional room in the inode,
it's probably not to be considered very clean. You can hack/implement
ACLs (although non-optimally) that way too.

--Malcolm

-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services