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 njs
Recipients asvetlov, christian.heimes, methane, njs, pitrou, vstinner, yselivanov
Date 2017-12-16.04:25:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Re-reading my above post, I realized I want to emphasize a little more how odd the current relationship is between socket.type and SOCK_CLOEXEC. Right now, the way it works is:

Python *always* adds SOCK_CLOEXEC to the type that it passes to the operating system when creating a socket. You can later toggle this with socket.set_inheritable, and check it with socket.get_inheritable.

You might expect that you could also check it with (socket.type | SOCK_CLOEXEC), and this does tell you *something*... but it has *no relationship at all* to whether the socket has close-on-exec enabled. Instead, what it tells you whether you passed SOCK_CLOEXEC to the socket constructor. Given that passing SOCK_CLOEXEC to the socket constructor is otherwise *completely ignored*, this seems like a weird piece of information to make available.
Date User Action Args
2017-12-16 04:25:52njssetrecipients: + njs, pitrou, vstinner, christian.heimes, asvetlov, methane, yselivanov
2017-12-16 04:25:52njssetmessageid: <>
2017-12-16 04:25:52njslinkissue32331 messages
2017-12-16 04:25:52njscreate