summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-01-15 23:02:35 (GMT)
committerGitHub <noreply@github.com>2019-01-15 23:02:35 (GMT)
commit9daecf37a571e98aaf43a387bcc9e41a7132f477 (patch)
tree845a37230f2a9d6eed12a4fc84727394ad323d68 /Doc/whatsnew
parenta37f52436f9aa4b9292878b72f3ff1480e2606c3 (diff)
downloadcpython-9daecf37a571e98aaf43a387bcc9e41a7132f477.zip
cpython-9daecf37a571e98aaf43a387bcc9e41a7132f477.tar.gz
cpython-9daecf37a571e98aaf43a387bcc9e41a7132f477.tar.bz2
bpo-35537: subprocess uses os.posix_spawn in some cases (GH-11452)
The subprocess module can now use the os.posix_spawn() function in some cases for better performance. Currently, it is only used on macOS and Linux (using glibc 2.24 or newer) if all these conditions are met: * executable path contains a directory * close_fds=False * preexec_fn, pass_fds, cwd, stdin, stdout, stderr and start_new_session parameters are not set Co-authored-by: Joannah Nanjekye <nanjekyejoannah@gmail.com>
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.8.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 370ef46..053fe90 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -275,6 +275,15 @@ xml
Optimizations
=============
+* The :mod:`subprocess` module can now use the :func:`os.posix_spawn` function
+ in some cases for better performance. Currently, it is only used on macOS
+ and Linux (using glibc 2.24 or newer) if all these conditions are met:
+
+ * *close_fds* is false;
+ * *preexec_fn*, *pass_fds*, *cwd*, *stdin*, *stdout*, *stderr* and
+ *start_new_session* parameters are not set;
+ * the *executable* path contains a directory.
+
* :func:`shutil.copyfile`, :func:`shutil.copy`, :func:`shutil.copy2`,
:func:`shutil.copytree` and :func:`shutil.move` use platform-specific
"fast-copy" syscalls on Linux, macOS and Solaris in order to copy the file