Socket::PassAccessRights

Socket::PassAccessRights is a Perl extension for BSD style file descriptor passing via Unix domain sockets.
Download

Socket::PassAccessRights Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sampo Kellomaki
  • Publisher web site:
  • http://search.cpan.org/~sampo/Socket-PassAccessRights-0.03/PassAccessRights.pm

Socket::PassAccessRights Tags


Socket::PassAccessRights Description

Socket::PassAccessRights is a Perl extension for BSD style file descriptor passing via Unix domain sockets. Socket::PassAccessRights is a Perl extension for BSD style file descriptor passing via Unix domain sockets.SYNOPSIS use Socket::PassAccessRights; Socket::PassAccessRights::sendfd(fileno(SOCKET), fileno(SEND_ME)) or die; $fd = Socket::PassAccessRights::recvfd(fileno(SOCKET)) or die; open FD, ">&=$fd" or die "$!"; # convert int fd to file handleImplements passing access rights (i.e. file descritors) over Unix domain sockets. Only one fd can be passed at one time and no other data can be sent in the same operation (operation itself involves sending exactly one byte of data to solve EOF detection anomaly).See test.pl and examples directory for usage examples.PLATFORMSThis code has only been tested on * Linux-2.0.38 with glibc-2.0.7 (libc.so.6) and libc.so.5 (BSD4.4 style) * Linux-2.2.14 with glibc-2.0.7 (libc.so.6) (BSD4.4 style) * Solaris-2.6 using gcc (BSD4.3 style)Specifically, the code from did not work out of the box. I had to rename msg.msg_accrights* to msg.control* and send at least one byte. General impression from net is that file descripto passing code seems to be buggy - not just in Linux, but on FreeBSD, too. Requirements: · Perl


Socket::PassAccessRights Related Software