-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Proposal: Remove Deno.umask (with no argument call) #13632
Comments
Updated the proposal. Now it proposes only the removal of no argument version of Deno.umask(). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
There are still ideas to improve Deno.umask (I think Bert has more details about it), but that isn't like the way described in this proposal. So I'm closing this for now. BTW the problem of umask first affected deno compat mode because of it's racy nature, but now we work around it by providing mock implementation to process.umask in std/node https://github.com/denoland/deno_std/blob/d697527754d17cb911671d82104191515b14f1cd/node/process.ts#L501 . So the priority of this issue is now very low |
FWIW, Node's |
I am still in favor of landing this FWIW. |
Deno.umask()
(no argument) has a race codition bug.Deno.umask()
(no argument) uses 2 syscalls and between these 2, there's small amount of time when theumask
value is incorrect, andmkdir
can create a directory with wrong permission on that timing.If we try to address the above issue properly, we probably need mutex lock for fs op calls. But that introduces much complexity, and also causes negative performance impact.
Alsoumask
is a global state, and not something we should encourage using in general situations i.e. it can be considered as an antipattern. So it doesn't make much sense to introduce new complexity to support this feature. So I propose we should removeDeno.umask
.I propose we should remove
Deno.umask
with no argumentThe text was updated successfully, but these errors were encountered: