Issue #6559: fix the subprocess.Popen pass_fds implementation. Add a unittest.

Issue #7213: Change the close_fds default on Windows to better match the new
default on POSIX.  True when possible (False if stdin/stdout/stderr are
supplied).

Update the documentation to reflect all of the above.
This commit is contained in:
Gregory P. Smith 2010-12-14 13:43:30 +00:00
parent 39f34aa1f3
commit 8edd99d085
5 changed files with 79 additions and 27 deletions

View file

@ -107,7 +107,7 @@ static void child_exec(char *const exec_array[],
errno = 0; /* We don't want to report an OSError. */
goto error;
}
if (keep_fd <= start_fd)
if (keep_fd < start_fd)
continue;
for (fd_num = start_fd; fd_num < keep_fd; ++fd_num) {
close(fd_num);