1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

fix(ext/node): export process.umask (#22348)

Fixes https://github.com/denoland/deno/issues/20914
This commit is contained in:
Divy Srivastava 2024-02-13 19:46:49 +05:30 committed by GitHub
parent 92f6188253
commit 492a9fbb91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,6 +97,15 @@ export const exit = (code?: number | string) => {
process.reallyExit(process.exitCode || 0);
};
/** https://nodejs.org/api/process.html#processumaskmask */
export const umask = () => {
// Always return the system default umask value.
// We don't use Deno.umask here because it has a race
// condition bug.
// See https://github.com/denoland/deno_std/issues/1893#issuecomment-1032897779
return 0o22;
};
export const abort = () => {
op_process_abort();
};