]> granicus.if.org Git - python/commitdiff
Don't restrict ourselves to a "max" fd when closing fds before exec()
authorGregory P. Smith <greg@krypto.org>
Sun, 1 Jun 2014 20:22:12 +0000 (13:22 -0700)
committerGregory P. Smith <greg@krypto.org>
Sun, 1 Jun 2014 20:22:12 +0000 (13:22 -0700)
when we have a way to get an actual list of all open fds from the OS.

Fixes issue #21618: The subprocess module would ignore fds that were
inherited by the calling process and already higher than POSIX resource
limits would otherwise allow.  On systems with a functioning /proc/self/fd
or /dev/fd interface the max is now ignored and all fds are closed.

1  2 
Misc/NEWS

diff --cc Misc/NEWS
index d2ececedadb3029bec013c5ffcd31e7c1fe9cc67,902d72e12c56a7e6c305fbba05d3f997bb7c3231..3bf554a426c91c0c10d03c8179d38a78fff308ab
+++ b/Misc/NEWS
@@@ -89,9 -18,11 +89,14 @@@ Core and Builtin
  Library
  -------
  
+ - Issue #21618: The subprocess module could fail to close open fds that were
+   inherited by the calling process and already higher than POSIX resource
+   limits would otherwise allow.  On systems with a functioning /proc/self/fd
+   or /dev/fd interface the max is now ignored and all fds are closed.
 +- Issue #20383: Introduce importlib.util.module_from_spec() as the preferred way
 +  to create a new module.
 +
  - Issue #21552: Fixed possible integer overflow of too long string lengths in
    the tkinter module on 64-bit platforms.