Brian Nitz wrote:
> Darren Kenny wrote:
>>
>>          o File Monitoring
>>                + In OpenSolaris, there is a kernel API called File
>>                  Event Mechanism. Unfortunately this still doesn't have
>>                  a userland API that could be used by applications or
>>                  libraries. Linux and AIX both have inotify to do this,
>>                  but OpenSolaris doesn't. This would be an interesting
>>                  project to get done and have libfam modified to
>>                  support OpenSolaris using this mechanism rather than
>>                  polling
> Shouldn't it be possible to emulate linux and/or AIX's file event 
> mechanism via libdtrace?
> _______________________________________________
> desktop-discuss mailing list
> desktop-discuss at opensolaris.org

It isn't actually a question of mechanism, but what
user semantic one would like to provide.

If you watch a file for writes, does that trip when the
file is unlinked and replaced with another like editors
do when they re-write a file?

What about mmapped files?  Should we map writes via an
mmapped buffer to a write via an FD?

Personally, I'm leaning in the mtime/atime direction;
if a file's mtime changes, we should detect that as a write;
if a files atime changes, we should consider that as a read.

This way programs that monitor via stat today will "just work",

- Bart


-- 
Bart Smaalders                  Solaris Kernel Performance
barts at cyber.eng.sun.com              http://blogs.sun.com/barts

Reply via email to