Author guettli
Recipients guettli
Date 2018-11-19.10:38:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542623894.75.0.788709270274.issue35275@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2018-11-19 10:38:14guettlisetrecipients: + guettli
2018-11-19 10:38:14guettlisetmessageid: <1542623894.75.0.788709270274.issue35275@psf.upfronthosting.co.za>
2018-11-19 10:38:14guettlilinkissue35275 messages
2018-11-19 10:38:14guettlicreate