Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add umask (or os.umask) command #278

Open
mdekstrand opened this issue Aug 24, 2023 · 2 comments
Open

Feature request: add umask (or os.umask) command #278

mdekstrand opened this issue Aug 24, 2023 · 2 comments
Labels
UnderTest Implementation being tested before merge

Comments

@mdekstrand
Copy link

It would be very useful to be able to set the process umask. Tcl doesn't provide this; there is an extension in TclX that does.

It seems that putting it in the posix extension would make sense to me.

@msteveb
Copy link
Owner

msteveb commented Aug 24, 2023

I can see that it would be useful. How would it interact with os.fork and exec?
What about file tempfile?

I would consider a patch, but I don't expect to get to this any time soon

@mdekstrand
Copy link
Author

For fork and exec — the umask should be inherited by child processes.

For file tempfile — it would inherit whatever behavior the underlying system calls have with respect to umask. If it's open, the umask will be used to determine the tempfile permissions, unless additional logic is added to change that. I expect just letting the default POSIX umask behavior take effect would be the least surprising for users of the command.

@msteveb msteveb added the UnderTest Implementation being tested before merge label Sep 26, 2024
msteveb added a commit that referenced this issue Nov 7, 2024
Fixes #278

Signed-off-by: Steve Bennett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UnderTest Implementation being tested before merge
Projects
None yet
Development

No branches or pull requests

2 participants