The getgroups function gets the current supplementary group IDs of the calling process. The list is stored in the array pointed to by the grouplist parameter. The gidsetsize parameter indicates the number of entries that can be stored in this array. The getgroups function never returns more IDs than the value indicated by the sysconf parameter _SC_NGROUPS_MAX. See also getgid and setsid.