Message286121
FWIW I agree with Antoine and Martin: ignoring EBADF is a bad idea,
quite dangerous.
The man page probably says this to highlight that users shouldn't
*retry* close():
"""
Retrying the close() after a failure return is the wrong thing to do,
since this may cause a reused file descriptor from another thread to
be closed. This can occur because the Linux kernel always releases
the file descriptor early in the close operation, freeing it for
reuse; the steps that may return an error, such as flushing data to
the filesystem or device, occur only later in the close operation.
"""
(Including on EINTR).
In short, I think that the change is a good idea: Socket.close() is
guaranteed to be idempotent, so this error can only happen in case of
invalid usage. |
|
Date |
User |
Action |
Args |
2017-01-23 22:03:48 | neologix | set | recipients:
+ neologix, pitrou, christian.heimes, martin.panter |
2017-01-23 22:03:48 | neologix | link | issue29343 messages |
2017-01-23 22:03:48 | neologix | create | |
|