lkml.org 
[lkml]   [1996]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: strange disk activity [tail -f]
Date
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


\
 
 \ /
  Last update: 2005-03-22 13:36    [W:1.017 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site