getegid
The process.getegid()
method returns the numerical effective group identity of the Node.js process. (See getegid(2)
.)
import process from 'node:process';
if (process.getegid) {
console.log(`Current gid: ${process.getegid()}`);
}
Content copied to clipboard
This function is only available on POSIX platforms (i.e. not Windows or Android).
Since
v2.0.0