This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cks
Recipients christian.heimes, cks
Date 2013-07-07.03:04:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373166258.27.0.406083721146.issue18391@psf.upfronthosting.co.za>
In-reply-to
Content
As far as I know, you can recover everything except the protocol
portably on Unix (and fromfd() will already handwave the protocol).
getsockopt() with SO_TYPE will give you the type. The family can be
recovered by calling getsockname() with a plain struct sockaddr and
then examining sockaddr.sa_family.

As for the other suggestion:

When Python is plugging into larger systems or APIs that pass sockets
around, it is not possible to modify those APIs to pass the additional
information that Python wants (and other environments don't need).
As far as I know, no current protocol that passes file descriptors to
newly started programs or passes file descriptors over Unix sockets
with sendmsg() and SCM_RIGHTS does this. The people responsible for
these protocols are not likely to change them to accommodate Python's
wants. A Python program (and thus Python programmers) get to deal with
the issue themselves if they want Python to participate in these
systems and protocols.

I do want to be able to write Python programs that can interact in
these environments. It is possible to deal with this in C; it is
even possible to hack around this in Python today. I believe that
it should be officially supported.
History
Date User Action Args
2013-07-07 03:04:18ckssetrecipients: + cks, christian.heimes
2013-07-07 03:04:18ckssetmessageid: <1373166258.27.0.406083721146.issue18391@psf.upfronthosting.co.za>
2013-07-07 03:04:18ckslinkissue18391 messages
2013-07-07 03:04:17ckscreate