summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/process.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/process.ts')
-rw-r--r--ext/node/polyfills/process.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/node/polyfills/process.ts b/ext/node/polyfills/process.ts
index 02837f827..de48fea3e 100644
--- a/ext/node/polyfills/process.ts
+++ b/ext/node/polyfills/process.ts
@@ -7,6 +7,7 @@
import { core, internals } from "ext:core/mod.js";
import { initializeDebugEnv } from "ext:deno_node/internal/util/debuglog.ts";
import {
+ op_getegid,
op_geteuid,
op_node_process_kill,
op_process_abort,
@@ -309,15 +310,16 @@ export function kill(pid: number, sig: string | number = "SIGTERM") {
return true;
}
-let getgid, getuid, geteuid;
+let getgid, getuid, getegid, geteuid;
if (!isWindows) {
getgid = () => Deno.gid();
getuid = () => Deno.uid();
+ getegid = () => op_getegid();
geteuid = () => op_geteuid();
}
-export { geteuid, getgid, getuid };
+export { getegid, geteuid, getgid, getuid };
const ALLOWED_FLAGS = buildAllowedFlags();
@@ -686,6 +688,9 @@ Process.prototype.getgid = getgid;
Process.prototype.getuid = getuid;
/** This method is removed on Windows */
+Process.prototype.getegid = getegid;
+
+/** This method is removed on Windows */
Process.prototype.geteuid = geteuid;
// TODO(kt3k): Implement this when we added -e option to node compat mode
@@ -726,6 +731,7 @@ Process.prototype.noDeprecation = false;
if (isWindows) {
delete Process.prototype.getgid;
delete Process.prototype.getuid;
+ delete Process.prototype.getegid;
delete Process.prototype.geteuid;
}