ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-FDPass/FDPass.pm
(Generate patch)

Comparing IO-FDPass/FDPass.pm (file contents):
Revision 1.4 by root, Fri Apr 5 08:20:36 2013 UTC vs.
Revision 1.6 by root, Fri Apr 5 09:15:37 2013 UTC

3IO::FDPass - pass a file descriptor over a socket 3IO::FDPass - pass a file descriptor over a socket
4 4
5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 use IO::FDPass; 7 use IO::FDPass;
8
9 IO::FDPass::send fileno $socket, fileno $fh_to_pass
10 or die "send failed: $!";
11
12 my $fd = IO::FDPass::recv fileno $socket;
13 $fd >= 0 or die "recv failed: $!";
8 14
9=head1 DESCRIPTION 15=head1 DESCRIPTION
10 16
11This small low-level module only has one purpose: pass a file descriptor 17This small low-level module only has one purpose: pass a file descriptor
12to another process, using a (streaming) unix domain socket (on POSIX 18to another process, using a (streaming) unix domain socket (on POSIX
95other file descriptor passing modules on CPAN: L<Linux::FDPasser> and 101other file descriptor passing modules on CPAN: L<Linux::FDPasser> and
96L<AnyEvent::FDPasser>. 102L<AnyEvent::FDPasser>.
97 103
98The former hasn't seen any release for over a decade, isn't 64 bit clean 104The former hasn't seen any release for over a decade, isn't 64 bit clean
99and it's author didn't respond to my mail with the fix. It does, however, 105and it's author didn't respond to my mail with the fix. It does, however,
100support a snumber of pre-standard unices. 106support a number of pre-standard unices.
101 107
102The latter seems to have similar support for antique unices, and doesn't 108The latter seems to have similar support for antique unices, and doesn't
103seem to suffer from 64 bit bugs, but inexplicably has a large perl part, 109seem to suffer from 64 bit bugs, but inexplicably has a large perl part,
104and requires AnyEvent. Presumably that makes it much more user friendly 110and requires AnyEvent. Presumably that makes it much more user friendly
105than this module. 111than this module.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines