… | |
… | |
3 | IO::FDPass - pass a file descriptor over a socket |
3 | IO::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 | |
11 | This small low-level module only has one purpose: pass a file descriptor |
17 | This small low-level module only has one purpose: pass a file descriptor |
12 | to another process, using a (streaming) unix domain socket (on POSIX |
18 | to another process, using a (streaming) unix domain socket (on POSIX |
… | |
… | |
95 | other file descriptor passing modules on CPAN: L<Linux::FDPasser> and |
101 | other file descriptor passing modules on CPAN: L<Linux::FDPasser> and |
96 | L<AnyEvent::FDPasser>. |
102 | L<AnyEvent::FDPasser>. |
97 | |
103 | |
98 | The former hasn't seen any release for over a decade, isn't 64 bit clean |
104 | The former hasn't seen any release for over a decade, isn't 64 bit clean |
99 | and it's author didn't respond to my mail with the fix. It does, however, |
105 | and it's author didn't respond to my mail with the fix. It does, however, |
100 | support a snumber of pre-standard unices. |
106 | support a number of pre-standard unices. |
101 | |
107 | |
102 | The latter seems to have similar support for antique unices, and doesn't |
108 | The latter seems to have similar support for antique unices, and doesn't |
103 | seem to suffer from 64 bit bugs, but inexplicably has a large perl part, |
109 | seem to suffer from 64 bit bugs, but inexplicably has a large perl part, |
104 | and requires AnyEvent. Presumably that makes it much more user friendly |
110 | and requires AnyEvent. Presumably that makes it much more user friendly |
105 | than this module. |
111 | than this module. |