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 pitrou
Recipients JoshN, docs@python, josh.r, martin.panter, pitrou
Date 2016-04-07.06:44:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460011492.71.0.393410043354.issue26703@psf.upfronthosting.co.za>
In-reply-to
Content
The general answer here is you should avoid mixing calls to different abstraction layers. Either use only the file descriptor or only the socket object.

This is not limited to lifetime issues, other issues can occur. For example, setting a timeout on a socket puts the underlying file descriptor in non-blocking mode. So code using the file descriptor can fail with EAGAIN.

If you really want to use *both* a file descriptor and a socket object, you can use os.dup() on the file descriptor, so that the OS resources are truly independent.
History
Date User Action Args
2016-04-07 06:44:52pitrousetrecipients: + pitrou, docs@python, martin.panter, josh.r, JoshN
2016-04-07 06:44:52pitrousetmessageid: <1460011492.71.0.393410043354.issue26703@psf.upfronthosting.co.za>
2016-04-07 06:44:52pitroulinkissue26703 messages
2016-04-07 06:44:52pitroucreate