LWN.net Logo

Advertisement

Interested in hardware, diags, validation, Linux, C, ARM, Microcode and low level programming and blazing networks?

Advertise here

inotify

inotify

Posted Jul 21, 2006 16:04 UTC (Fri) by nix (subscriber, #2304)
In reply to: inotify by cventers
Parent article: OLS: On how user space sucks

No, in practice you must build something which tests for inotify at runtime and falls back to dnotify or even polling. The reason: distributors won't want to build programs which fail to work when run on kernels as recent as 2.6.12 --- at least, not non-system-level programs.

However, this is perfectly doable.


(Log in to post comments)

inotify

Posted Jul 21, 2006 16:45 UTC (Fri) by cventers (subscriber, #31465) [Link]

Ah, good point. Well, at the very least, having build-time inotify
support would assist some of us (crazy Gentoo users that spend half our
lives watching a compiler) immediately and others later ;)

But yes, just attempt inotify at startup. -ENOSYS? Ok, we'll try this
another way.

inotify

Posted Jul 21, 2006 18:31 UTC (Fri) by nix (subscriber, #2304) [Link]

fam 2.7.0 uses dnotify in any case, if it's available. It may not be as nice as inotify but it's a hell of a lot better than polling.

Hm. Looking at the sources, gamin has had an inotify backend since v0.0.8, Aug 26 2004, *long* before inotify hit the kernel proper. It is enabled by default.

Looks like this might be an out-and-out bug. I'll have a look this weekend and see if I can reproduce and fix it.

inotify

Posted Jul 23, 2006 17:51 UTC (Sun) by NAR (subscriber, #1313) [Link]

in practice you must build something which tests for inotify at runtime and falls back to dnotify or even polling.[...]However, this is perfectly doable.

Yes, but I'm afraid this is way above the avarage application programmer's level.

Bye,NAR

inotify

Posted Jul 23, 2006 17:55 UTC (Sun) by cventers (subscriber, #31465) [Link]

True, but this is something that should be part of the desktop
infrastructure, not a part of every application. Most application
programmers wouldn't have a lot of fun with Xlib either, but someone's got
to do it...

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds