process.getgroups()


process.getgroups() 方法返回带有补充组 ID 的数组。 POSIX 不指定是否包含有效组 ID,但 Node.js 确保它始终包含。

此功能仅适用于 POSIX 平台(即不适用于 Windows 或安卓)。

The process.getgroups() method returns an array with the supplementary group IDs. POSIX leaves it unspecified if the effective group ID is included but Node.js ensures it always is.

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