Browse Source

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>
archived-io.js-v0.12
Carlos Campderrós 11 years ago
committed by Bert Belder
parent
commit
13ad06e095
  1. 2
      doc/api/process.markdown

2
doc/api/process.markdown

@ -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…
Cancel
Save