diff options
author | Gregory P. Smith <greg@krypto.org> | 2019-10-12 20:24:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-12 20:24:56 (GMT) |
commit | f3751efb5c8b53b37efbbf75d9422c1d11c01646 (patch) | |
tree | 2e650d45ee4a530df31c2b66d9457d11e6996f33 /Doc/library/subprocess.rst | |
parent | 8177404d520e81f16324a900f093adf3856d33f8 (diff) | |
download | cpython-f3751efb5c8b53b37efbbf75d9422c1d11c01646.zip cpython-f3751efb5c8b53b37efbbf75d9422c1d11c01646.tar.gz cpython-f3751efb5c8b53b37efbbf75d9422c1d11c01646.tar.bz2 |
bpo-38417: Add umask support to subprocess (GH-16726)
On POSIX systems, allow the umask to be set in the child process before we exec.
Diffstat (limited to 'Doc/library/subprocess.rst')
-rw-r--r-- | Doc/library/subprocess.rst | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 1a98bb3..19290bf 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -339,9 +339,9 @@ functions. stderr=None, preexec_fn=None, close_fds=True, shell=False, \ cwd=None, env=None, universal_newlines=None, \ startupinfo=None, creationflags=0, restore_signals=True, \ - start_new_session=False, pass_fds=(), *, group=None, \ - extra_groups=None, user=None, encoding=None, errors=None, \ - text=None) + start_new_session=False, pass_fds=(), \*, group=None, \ + extra_groups=None, user=None, umask=-1, \ + encoding=None, errors=None, text=None) Execute a child program in a new process. On POSIX, the class uses :meth:`os.execvp`-like behavior to execute the child program. On Windows, @@ -572,6 +572,12 @@ functions. .. availability:: POSIX .. versionadded:: 3.9 + If *umask* is not negative, the umask() system call will be made in the + child process prior to the execution of the subprocess. + + .. availability:: POSIX + .. versionadded:: 3.9 + If *env* is not ``None``, it must be a mapping that defines the environment variables for the new process; these are used instead of the default behavior of inheriting the current process' environment. |