[Python-Dev] Re: [Python-checkins] python/dist/src/Modules
socketmodule.c, 1.298, 1.299
Andrew McNamara
andrewm at object-craft.com.au
Fri Aug 20 06:44:36 CEST 2004
>> Patch #1003700: Add socketpair function to socket module.
>
>The docstring (below) states the arguments are the same as socket().
>However, in sock_initobj() line 2496, the family is initialized to
>AF_INET. I think the #if defined(AF_UNIX) code above should be
>removed and family should be initialized to AF_INET.
I talked Dave into this - AF_UNIX is typically the only address family
that is valid for socketpair(). Using AF_INET under linux and OS X
results in EOPNOTSUPP.
>I don't think the #ifdef SIGPIPE code is correct. If the user
>installed a signal handler calling signal() will remove it. I
>think the call to signal() should be removed.
I agree, but I think that was copied verbatim from elsewhere in
socketmodule.c, so it was left with the aim of being bug for bug
compatible with socket.socket().
--
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
More information about the Python-Dev
mailing list