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/17/merge
parent
c90eac7e0e
commit
13ad06e095
|
@ -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
|
||||
given, otherwise returns the current mask.
|
||||
|
||||
var oldmask, newmask = 0644;
|
||||
var oldmask, newmask = 0022;
|
||||
|
||||
oldmask = process.umask(newmask);
|
||||
console.log('Changed umask from: ' + oldmask.toString(8) +
|
||||
|
|
Loading…
Reference in New Issue