Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Getting Linux::Inotify2 and POE to work with select_read()

by jfroebe (Parson)
on Oct 06, 2008 at 23:30 UTC ( #715667=note: print w/replies, xml ) Need Help??


in reply to Re: Getting Linux::Inotify2 and POE to work with select_read()
in thread Getting Linux::Inotify2 and POE to work with select_read()

bingo!

### Add a select to the session, and possibly begin a watcher. sub _data_handle_add { my ($self, $handle, $mode, $session, $event, $args) = @_; my $fd = fileno($handle);

I receive the file descriptor from Linux::Inotify2 but I need a file handle to send to select_read(). Does anyone know how to convert a file descriptor to a file handle? This is definitely a Monday

Jason L. Froebe

Blog, Tech Blog

Replies are listed 'Best First'.
Re^3: Getting Linux::Inotify2 and POE to work with select_read() (fdopen)
by tye (Sage) on Oct 07, 2008 at 01:41 UTC
    open FH, "<&=".$fd or die "Can't fdopen $fd: $!\n";

    - tye        

      Thanks Tye! That worked perfectly :) Can you tell it is Monday here?

      Jason L. Froebe

      Blog, Tech Blog

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://715667]
help
Chatterbox?
[stevieb]: perldigious: video near our hq in Montreal. Here in Calgary, it's -28c... we've only got 3" of snow so far, but there are several feet in the mountains already
[perldigious]: Snowshoeing time stevieb? I need to buy a pair so I can walk my German Shepherd properly through the country.
[stevieb]: yeah, I snowshoe a fair amount in the mountains. I also use spikes similar to these very often as well
[perldigious]: Discipulus: alternate link
[stevieb]: LOL you can easily replace "Helsinki" with "Alberta"
[perldigious]: I used to live at the top of a very steep hill stevieb, I can relate to the video. Literally used to have to build up momentum and try to force my vehicle to make it up the hill to park in my driveway properly... didn't always make it.
[choroba]: Why don't they use tire chains?

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2016-12-06 16:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (112 votes). Check out past polls.