method
groups
groups()
public
Get an Array of the group IDs in the supplemental group access list for this process.
Process.groups #=> [27, 6, 10, 11]
Note that this method is just a wrapper of getgroups(2). This means that the following characteristics of the result completely depend on your system:
-
the result is sorted
-
the result includes effective GIDs
-
the result does not include duplicated GIDs
You can make sure to get a sorted unique GID list of the current process by this expression:
Process.groups.uniq.sort