Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: How to do a blocking readdir or similar

by saintmike (Vicar)
on Dec 19, 2005 at 04:08 UTC ( #517660=note: print w/replies, xml ) Need Help??


in reply to Re: How to do a blocking readdir or similar
in thread How to do a blocking readdir or similar

POSIX doesn't provide such a hook, so most unix-like systems also don't have such a hook
Actually, Linux provides such a hook. Check out SGI::FAM for using the file alteration monitor based on dnotify or Linux::Inotify2 for newer kernels.
  • Comment on Re^2: How to do a blocking readdir or similar

Replies are listed 'Best First'.
Re^3: How to do a blocking readdir or similar
by Kanji (Parson) on Dec 19, 2005 at 06:25 UTC

    OS X (which the OP was using) shares more with FreeBSD than Linux, so IO::KQueue is probably a more appropriate choice.

    From the README...

    This module is a low level interface to the FreeBSD and Mac OS X kqueue() system call. This is basically equivalent to epoll() on Linux - a high performance poll() replacement.

        --k.


Re^3: How to do a blocking readdir or similar
by james2vegas (Chaplain) on Aug 24, 2009 at 07:38 UTC
    SGI::FAM seems like a more compatible and less linux-only solution, and fam should run on Mac Os X (and BSDs of all stripes really, as it can be compiled to run with kqueue

    Update: Maybe that is not such a good recommendation, SGI::FAM depends on deprecated File::PathConvert, has an unregistered dependency on Test::Helper and doesn't find my libfam without help.
    After that, it does seem to work, though, quite well, though only on famd started as a daemon, not running through inetd.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://517660]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2021-12-04 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (30 votes). Check out past polls.

    Notices?