|
||||||||||
|
|
||||||||||
NavigationMy posts on Twitter
|
Efficient file change notificationsMany applications rely on tracking filesystem changes internally, and until recently, the most popular library providing functionality like this was More recently, ultra-efficient kernel-side support for monitoring file changes was merged into Linux 2.6. This functionality, called inotify, is on by default, and is probably already available on your system (assuming you are relatively up-to-date). Gamin will be the default for new Gentoo installs, but there is no automatic migration for existing users at this time. It is recommended that you make the switch manually: +-------------------------------------------------------------------------+ | Code Listing 1: | | Switching to gamin | +-------------------------------------------------------------------------+ | | |# emerge -C app-admin/fam | |# emerge --oneshot app-admin/gamin | |It is not necessary to re-merge any software that is built on | |FAM, as gamin is literally a drop-in replacement. | | | | | +-------------------------------------------------------------------------+ Note: Gamin also supports plain old filesystem polling, and seems to do a better job than FAM did. Even if you do not have an inotify-enabled system, it is still recommended that you change. Given that the overhead for monitoring filesystem events is now so low, it is also suggested that you enable file-monitoring support for applications which optionally support it. To do so, enable the "fam" USE flag: +-------------------------------------------------------------------------+ | Code Listing 2: | | Add 'fam' USE flag and rebuild world | +-------------------------------------------------------------------------+ | | |# nano -w /etc/make.conf | |Add "fam" to your USE variable and save the file | |# emerge --newuse world | | | +-------------------------------------------------------------------------+ |
|
||||||||
| © Copyleft 2005-2011 - Lode Vanstechelman - Login | ||||||||||