mirror of https://github.com/nodejs/node.git
doc: set logical umask in process.umask example
0644 seems to be the desired mode for new files (as it is a very weird umask), and to achieve that the correct umask would be 0022. PR-URL: https://github.com/joyent/node/pull/8039 Reviewed-by: Trevor Norris <trev.norris@gmail.com>pull/124/head^2
parent
6120472036
commit
4815873bb5
|
@ -708,7 +708,7 @@ Sets or reads the process's file mode creation mask. Child processes inherit
|
||||||
the mask from the parent process. Returns the old mask if `mask` argument is
|
the mask from the parent process. Returns the old mask if `mask` argument is
|
||||||
given, otherwise returns the current mask.
|
given, otherwise returns the current mask.
|
||||||
|
|
||||||
var oldmask, newmask = 0644;
|
var oldmask, newmask = 0022;
|
||||||
|
|
||||||
oldmask = process.umask(newmask);
|
oldmask = process.umask(newmask);
|
||||||
console.log('Changed umask from: ' + oldmask.toString(8) +
|
console.log('Changed umask from: ' + oldmask.toString(8) +
|
||||||
|
|
Loading…
Reference in New Issue