summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/_bootstrap_external.py
diff options
context:
space:
mode:
authorOleg Iarygin <oleg@arhadthedev.net>2023-01-14 20:11:04 (GMT)
committerGitHub <noreply@github.com>2023-01-14 20:11:04 (GMT)
commit124af17b6e49f0f22fbe646fb57800393235d704 (patch)
treed85e0b7535af6ba3fe81193a6d935697334a963d /Lib/importlib/_bootstrap_external.py
parent49cae39ef020eaf242607bb2d2d193760b9855a6 (diff)
downloadcpython-124af17b6e49f0f22fbe646fb57800393235d704.zip
cpython-124af17b6e49f0f22fbe646fb57800393235d704.tar.gz
cpython-124af17b6e49f0f22fbe646fb57800393235d704.tar.bz2
gh-94518: [_posixsubprocess] Replace variable validity flags with reserved values (#94687)
Have _posixsubprocess.c stop using boolean flags to say if gid and uid values were supplied and action is required. Such an implicit "either initialized or look somewhere else" confused both the reader (another mental connection to constantly track between functions) and a compiler (warnings on potentially uninitialized variables being passed). Instead, we can utilize a special group/user id as a flag value -1 defined by POSIX but used nowhere else. Namely: gid: call_setgid = False → gid = -1 uid: call_setuid = False → uid = -1 groups: call_setgroups = False → groups = NULL (obtained with (groups_list != Py_None) ? groups : NULL) This PR is required for #94519.
Diffstat (limited to 'Lib/importlib/_bootstrap_external.py')
0 files changed, 0 insertions, 0 deletions