On this page

    M

    process.getgid

    History
    process.getgid(): Object
    Returns:Object

    The process.getgid() method returns the numerical group identity of the process. (See getgid(2).)

    import process from 'node:process';
    
    if (process.getgid) {
      console.log(`Current gid: ${process.getgid()}`);
    }
    if (process.getgid) {
      console.log(`Current gid: ${process.getgid()}`);
    }

    This function is only available on POSIX platforms (i.e. not Windows or Android).