Mailing List Archive

accept() and AF_UNIX sockets - comp.lang.perl.misc #7112
I just found out this should have been sent to perlbug@perl.com:

In article <428c77$841@asbe05.phx1.aro.allied.com>, b12635@phxbw173.phx1.aro.allied.com (Philip Tait) writes:

Perl 5.001 on Digital Unix (Alpha).

There appears to be a problem with accept() and AF_UNIX sockets.

The first call to accept() works correctly. On the second call, the first
client's pending read() returns zero bytes.

The address returned by accept() unpacks to give sun_family=1 (AF_UNIX), but
sun_path is zero length.

Looking at pp_accept() in pp_sys.c, a variable of type "struct sockaddr_in"
is declared, which might indicate that the use of AF_INET sockets is assumed.

Comments from anyone who has used AF_UNIX sockets in Perl would be
appreciated.

--

Philip J. Tait AlliedSignal Engines, Phoenix, Az +1 602 231 7104
GED::B12635 pjt@pelab.allied.com Philip.Tait@phxase.allied.com

--

Philip J. Tait AlliedSignal Engines, Phoenix, Az +1 602 231 7104
GED::B12635 pjt@pelab.allied.com Philip.Tait@phxase.allied.com
http://www.phx1.aro.allied.com/~b12635/