[issue35275] Reading umask (thread-safe)
Thomas Guettler
report at bugs.python.org
Mon Nov 19 05:38:14 EST 2018
New submission from Thomas Guettler <guettli at thomas-guettler.de>:
Up to now there is no thread way to read the umask in Python
https://stackoverflow.com/questions/53227072/reading-umask-thread-safe
You can use this pattern:
current_umask = os.umask(0) # line1
os.umask(current_umask) # line2
return current_umask
A thread which executes between line1 and line2 will have a different umask.
I would be great, if the python standard library would provide correspondig thread safe method.
Related question at stackoverflow: https://stackoverflow.com/questions/53227072/reading-umask-thread-safe
----------
messages: 330083
nosy: guettli
priority: normal
severity: normal
status: open
title: Reading umask (thread-safe)
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35275>
_______________________________________
More information about the Python-bugs-list
mailing list