mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-113117: Support posix_spawn in subprocess.Popen with close_fds=True (#113118)
Add support for `os.POSIX_SPAWN_CLOSEFROM` and `posix_spawn_file_actions_addclosefrom_np` and have the `subprocess` module use them when available. This means `posix_spawn` can now be used in the default `close_fds=True` situation on many platforms. Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
This commit is contained in:
parent
32d87a8899
commit
2b93f52242
9 changed files with 91 additions and 5 deletions
6
configure
generated
vendored
6
configure
generated
vendored
|
|
@ -17779,6 +17779,12 @@ if test "x$ac_cv_func_posix_spawnp" = xyes
|
|||
then :
|
||||
printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_addclosefrom_np" "ac_cv_func_posix_spawn_file_actions_addclosefrom_np"
|
||||
if test "x$ac_cv_func_posix_spawn_file_actions_addclosefrom_np" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
|
||||
if test "x$ac_cv_func_pread" = xyes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue