On Thursday 26 Jun 2003 10:38 pm, Jenda Krynicky wrote: > From: Chris Zimmerman <[EMAIL PROTECTED]> > > > Is there some way that I can write a bit of code that will watch a > > directory and as soon as a file is written to that directory, > > something is run against that file? What would be the best way to > > turn this into a daemon? > > Depends on the OS. > Under windows it'd be Win32::ChangeNotify and > Win32::Daemon(::Simple)?
I know a while back (12 months?) a talk was given at our local LUG - http://www.wylug.org.uk - about hooks being placed in the Linux kernel so that user mode processed could register an interest in a file or directory and would receive a SIG if any change occured. The idea was so that progs like 'top' could become much more efficient by sleeping instead of polling, but I don't know how far along this is, or whether anyone's written a perl module for it yet. Gary > > Jenda > ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== > When it comes to wine, women and song, wizards are allowed > to get drunk and croon as much as they like. > -- Terry Pratchett in Sourcery -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]