Message300658
| Author |
vstinner |
| Recipients |
Segev Finer, eryksun, paul.moore, steve.dower, terry.reedy, tim.golden, vstinner, zach.ware |
| Date |
2017年08月21日.22:24:53 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1503354294.06.0.000790666195616.issue30121@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Python 2.7 doesn't seem to be affected by this issue. Extract of Popen.__init__:
try:
self._execute_child(args, executable, preexec_fn, close_fds,
cwd, env, universal_newlines,
startupinfo, creationflags, shell, to_close,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
except Exception:
# Preserve original exception in case os.close raises.
exc_type, exc_value, exc_trace = sys.exc_info()
for fd in to_close:
try:
if mswindows:
fd.Close()
else:
os.close(fd)
except EnvironmentError:
pass
On Windows, fd.Close() is always used. |
|