process.getgid()
- 返回: <Object>
process.getgid()
方法返回进程的数字群组标识。
(见 getgid(2)
。)
import process from 'node:process';
if (process.getgid) {
console.log(`Current gid: ${process.getgid()}`);
}
const process = require('node:process');
if (process.getgid) {
console.log(`Current gid: ${process.getgid()}`);
}
此功能仅适用于 POSIX 平台(即不适用于 Windows 或安卓)。
- 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()}`);
}
const process = require('node:process');
if (process.getgid) {
console.log(`Current gid: ${process.getgid()}`);
}
This function is only available on POSIX platforms (i.e. not Windows or Android).