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.3 by root, Fri Apr 5 05:04:59 2013 UTC vs.
Revision 1.4 by root, Fri Apr 5 08:20:36 2013 UTC

19=cut 19=cut
20 20
21package IO::FDPass; 21package IO::FDPass;
22 22
23BEGIN { 23BEGIN {
24 $VERSION = '0.1'; 24 $VERSION = 0.2;
25 25
26 require XSLoader; 26 require XSLoader;
27 XSLoader::load (__PACKAGE__, $VERSION); 27 XSLoader::load (__PACKAGE__, $VERSION);
28} 28}
29 29
75and 64 bit and Strawberry Perl 5.16.3 32 and 64 bit, and found to work, 75and 64 bit and Strawberry Perl 5.16.3 32 and 64 bit, and found to work,
76although ActivePerl 32 bit needed a newer MinGW version (that supports XP 76although ActivePerl 32 bit needed a newer MinGW version (that supports XP
77and higher). 77and higher).
78 78
79However, windows doesn't support asynchronous file descriptor passing, so 79However, windows doesn't support asynchronous file descriptor passing, so
80C<send> and C<recv> will have to "rendezvous", that is, they have to wait 80the source process must still be around when the destination process wants
81for each other. Therefore, on windows, it's advisable to run them at the 81to receive the file handle. Also, if the target process fails to fetch the
82same time to avoid any unnecessary delays. 82handle, the handle will leak, so never do that.
83 83
84Also, on windows, the passing process must give the receiving process the 84Also, on windows, the receiving process must have the PROCESS_DUP_HANDLE
85PROCESS_DUP_HANDLE access right for this module to work. 85access right on the sender process for this module to work.
86 86
87Cygwin is not supported at the moment, as file descriptor passing in 87Cygwin is not supported at the moment, as file descriptor passing in
88cygwin is not supported, and cannot be rolled on your own as cygwin has no 88cygwin is not supported, and cannot be rolled on your own as cygwin has no
89(working) method of opening a handle as fd. That is, it has one, but that 89(working) method of opening a handle as fd. That is, it has one, but that
90one isn't exposed to programs, and only used for stdin/out/err. Sigh. 90one isn't exposed to programs, and only used for stdin/out/err. Sigh.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines