GETGROUPS(2) UNIX Programmer's Manual GETGROUPS(2) NAME getgroups - get group access list SYNOPSIS #include ngroups = getgroups(gidsetlen, gidset) int ngroups, gidsetlen, *gidset; DESCRIPTION _G_e_t_g_r_o_u_p_s gets the current group access list of the user process and stores it in the array _g_i_d_s_e_t. The parameter _g_i_d_s_e_t_l_e_n indicates the number of entries that may be placed in _g_i_d_s_e_t. _G_e_t_g_r_o_u_p_s returns the actual number of groups returned in _g_i_d_s_e_t. No more than NGROUPS, as defined in <_s_y_s/_p_a_r_a_m._h>, will ever be returned. RETURN VALUE A successful call returns the number of groups in the group set. A value of -1 indicates that an error occurred, and the error code is stored in the global variable _e_r_r_n_o. ERRORS The possible errors for _g_e_t_g_r_o_u_p are: [EINVAL] The argument _g_i_d_s_e_t_l_e_n is smaller than the number of groups in the group set. [EFAULT] The argument _g_i_d_s_e_t specifies an invalid address. SEE ALSO setgroups(2), initgroups(3X) BUGS The _g_i_d_s_e_t array should be of type gid_t, but remains integer for compatibility with earlier systems. Printed 11/26/99 May 13, 1986 1