Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Linux::Inotify2 - unable to receive events

by Animator (Hermit)
on Oct 03, 2008 at 22:01 UTC ( [id://715288]=note: print w/replies, xml ) Need Help??


in reply to Linux::Inotify2 - unable to receive events

I'm facing some problems installing Linux::Inotify2 so I can't test it myself at the moment but this is what I noticed:

The SYNOPSIS of Linux::Inotify2 contains Event->... your code does not.

Did you try the examples in the Linux::Inotify2 package? eg/simple and eg/event? Did these work?

  • Comment on Re: Linux::Inotify2 - unable to receive events

Replies are listed 'Best First'.
Re^2: Linux::Inotify2 - unable to receive events
by jfroebe (Parson) on Oct 04, 2008 at 01:46 UTC

    Did more testing. Looks like the perldoc is wrong. The $inotify->poll needs to be called AFTER the $inotify->watch routines are set!</p.

    Thanks Animator for making me rethink how I was calling it.

    Jason L. Froebe

    Blog, Tech Blog

Re^2: Linux::Inotify2 - unable to receive events
by jfroebe (Parson) on Oct 04, 2008 at 01:18 UTC

    I think you're referring to the following snippet:

    # for Event: Event->io (fd =>$inotify->fileno, poll => 'r', cb => sub { $inotify-> +poll }); # for Glib: add_watch Glib::IO $inotify->fileno, in => sub { $inotify->poll }; # manually: 1 while $inotify->poll;

    These are three separate ways of creating a loop for $inotify->poll. Yup, I tried all three ways. I'm using the third method to isolate the issue.

    Thanks though

    Jason L. Froebe

    Blog, Tech Blog

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found