Don't restrict ourselves to a "max" fd when closing fds before exec()
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.
Don't restrict ourselves to a "max" fd when closing fds before exec()
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.
Fix the comment to not refer to the removed end_fd parameter.
Explicitly wait for the child instead of letting a destructor do it.
merge the end_fd comment fix and explicit wait() for the child.
Attempt to fix the "too many open files" errors on several of the
buildbots that the new test_close_fds_when_max_fd_is_lowered test causes.
It now leaves 10 more low fd's available.
Attempt to fix the "too many open files" errors on several of the
buildbots that the new test_close_fds_when_max_fd_is_lowered test causes.
It now leaves 10 more low fd's available.
Skip test_subprocess test_close_fds_when_max_fd_is_lowered on FreeBSD
when fdescfs is not mounted on /dev/fd.
Skip test_subprocess test_close_fds_when_max_fd_is_lowered on FreeBSD
when fdescfs is not mounted on /dev/fd.
Updated logging HOWTO section on optimization.
Merged documentation update from 3.4.