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

If we are using the same version of POE, line 291 is a fileno() call. Whatever you pass to select_read() should be sufficiently filehandly that fileno($it) works.

  • Comment on Re: Getting Linux::Inotify2 and POE to work with select_read()

Replies are listed 'Best First'.
Re^2: Getting Linux::Inotify2 and POE to work with select_read()
by jfroebe (Parson) on Oct 06, 2008 at 23:30 UTC

    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

      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