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.
This commit is contained in:
Gregory P. Smith 2019-10-12 13:24:56 -07:00 committed by GitHub
parent 8177404d52
commit f3751efb5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 57 additions and 19 deletions

View file

@ -429,7 +429,7 @@ def spawnv_passfds(path, args, passfds):
return _posixsubprocess.fork_exec(
args, [os.fsencode(path)], True, passfds, None, None,
-1, -1, -1, -1, -1, -1, errpipe_read, errpipe_write,
False, False, None, None, None, None)
False, False, None, None, None, -1, None)
finally:
os.close(errpipe_read)
os.close(errpipe_write)