mirror of
https://github.com/python/cpython.git
synced 2025-11-20 10:57:44 +00:00
merge the end_fd comment fix and explicit wait() for the child.
This commit is contained in:
commit
45f31d1492
2 changed files with 3 additions and 3 deletions
|
|
@ -1966,7 +1966,7 @@ class POSIXProcessTestCase(BaseTestCase):
|
||||||
import subprocess, sys
|
import subprocess, sys
|
||||||
subprocess.Popen([sys.executable, {fd_status!r}] +
|
subprocess.Popen([sys.executable, {fd_status!r}] +
|
||||||
[str(x) for x in range({max_fd})],
|
[str(x) for x in range({max_fd})],
|
||||||
close_fds=True)
|
close_fds=True).wait()
|
||||||
""".format(fd_status=fd_status, max_fd=max_fd_open+1))],
|
""".format(fd_status=fd_status, max_fd=max_fd_open+1))],
|
||||||
stdout=subprocess.PIPE, close_fds=False)
|
stdout=subprocess.PIPE, close_fds=False)
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
|
|
@ -234,8 +234,8 @@ struct linux_dirent64 {
|
||||||
char d_name[256]; /* Filename (null-terminated) */
|
char d_name[256]; /* Filename (null-terminated) */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Close all open file descriptors in the range start_fd inclusive to end_fd
|
/* Close all open file descriptors in the range from start_fd and higher
|
||||||
* exclusive. Do not close any in the sorted py_fds_to_keep list.
|
* Do not close any in the sorted py_fds_to_keep list.
|
||||||
*
|
*
|
||||||
* This version is async signal safe as it does not make any unsafe C library
|
* This version is async signal safe as it does not make any unsafe C library
|
||||||
* calls, malloc calls or handle any locks. It is _unfortunate_ to be forced
|
* calls, malloc calls or handle any locks. It is _unfortunate_ to be forced
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue