Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Wednesday October 02, 2002
01:53 PM

FAM: Files that don't live forever

[ #8137 ]

I used to always want a UNIX system call with semantics that said, "Block until a certain file exists." Now, you can poll for that, of course, but it's not near as fun (read "elegant") as having the OS (or at least something beyond your tiny little program) do it for you.

Today I discovered FAM, which is probably installed on your system. libfam provides just such a call. I gather that if you have a companion package, imon, installaed, imon will handle all monitoring for you, or else FAM will poll. Either way, you don't have to worry about it in your program. Plus, if several processes want to watch the same file, FAM doesn't duplicate effort.

FAM will handle several file events: creation, deletion, changes, etc. It is open source, from SGI. Works with GNU/Linux and IRIX, and rumored to work on FreeBSD and Solaris.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • There's already a CPAN module [cpan.org] for it. I remember vaguely having tried it unsuccessfully years ago. Perhaps will you find it useful.
    • Thanks! That was actually my next question, though I got distracted and never made it to CPAN to check.

      Looks like this module is from 1997, so it probably hasn't been updated since you tried it. MMMV. :) I was interested to notice that FAM was invented in 1989.

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers