Message308451
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:52 | njs | set | recipients:
+ njs, pitrou, vstinner, christian.heimes, asvetlov, methane, yselivanov |
2017-12-16 04:25:52 | njs | set | messageid: <1513398352.92.0.213398074469.issue32331@psf.upfronthosting.co.za> |
2017-12-16 04:25:52 | njs | link | issue32331 messages |
2017-12-16 04:25:52 | njs | create | |
|