IO-FDPass
    
    
  
  
  
view release on metacpan or search on metacpan
   IO::FDPass::send fileno $socket, fileno $fh_to_pass
      or die "send failed: $!";
   my $fd = IO::FDPass::recv fileno $socket;
   $fd >= 0 or die "recv failed: $!";
=head1 DESCRIPTION
This small low-level module only has one purpose: pass a file descriptor
to another process, using a (streaming) unix domain socket (on POSIX
systems) or any (streaming) socket (on WIN32 systems). The ability to pass
file descriptors on windows is currently the unique selling point of this
module. Have I mentioned that it is really small, too?
=head1 FUNCTIONS
=over 4
=cut
package IO::FDPass;
       use IO::FDPass;
       IO::FDPass::send fileno $socket, fileno $fh_to_pass
          or die "send failed: $!";
       my $fd = IO::FDPass::recv fileno $socket;
       $fd >= 0 or die "recv failed: $!";
DESCRIPTION
    This small low-level module only has one purpose: pass a file descriptor
    to another process, using a (streaming) unix domain socket (on POSIX
    systems) or any (streaming) socket (on WIN32 systems). The ability to
    pass file descriptors on windows is currently the unique selling point
    of this module. Have I mentioned that it is really small, too?
FUNCTIONS
    $bool = IO::FDPass::send $socket_fd, $fd_to_pass
        Sends the file descriptor given by $fd_to_pass over the socket
        $socket_fd. Return true if it worked, false otherwise.
        Note that *both* parameters must be file descriptors, not handles.
( run in 0.655 second using v1.01-cache-2.11-cpan-5dc5da66d9d )