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

doc: process.umask doc unclear #14169

Closed
jsumners opened this issue Jul 11, 2017 · 3 comments
Closed

doc: process.umask doc unclear #14169

jsumners opened this issue Jul 11, 2017 · 3 comments
Labels
doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. question Issues that look for answers.

Comments

@jsumners
Copy link
Contributor

  • Subsystem: doc

https://github.com/nodejs/node/blob/199ad1d73f81c1d568232df418090e9ce3c4a7fb/doc/api/process.md#processumaskmask

The documentation for process.umask reads:

The process.umask() method sets or returns the Node.js process's file mode creation mask. Child processes inherit the mask from the parent process. The old mask is return if the mask argument is given, otherwise returns the current mask.

I have emphasized the last sentence since that is the one that doesn't make any sense. Is it saying var oldmask = process.umask() or var oldmask = process.umask(0)?

@vsemozhetbyt vsemozhetbyt added doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. question Issues that look for answers. labels Jul 11, 2017
@bnoordhuis
Copy link
Member

Both, except the no-arg version doesn't change the umask so the returned value is still the active umask after the call returns.

@jsumners
Copy link
Contributor Author

How about:

Invoked without an argument, the current mask is returned, otherwise the umask is set to the argument value and the previous mask is returned.

@bnoordhuis
Copy link
Member

Sounds good.

addaleax pushed a commit that referenced this issue Jul 18, 2017
PR-URL: #14170
Fixes: #14169
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fishrock123 pushed a commit that referenced this issue Jul 19, 2017
PR-URL: #14170
Fixes: #14169
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Aug 16, 2017
PR-URL: #14170
Fixes: #14169
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Aug 16, 2017
PR-URL: #14170
Fixes: #14169
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 5, 2017
PR-URL: #14170
Fixes: #14169
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. question Issues that look for answers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants