4.4BSD/usr/share/man/cat2/getgroups.0

Compare this file to the similar file:
Show the results in this format:

GETGROUPS(2)                BSD Programmer's Manual               GETGROUPS(2)

NNAAMMEE
     ggeettggrroouuppss - get group access list

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<ssyyss//ppaarraamm..hh>>
     ##iinncclluuddee <<uunniissttdd..hh>>

     _i_n_t
     ggeettggrroouuppss(_i_n_t _g_i_d_s_e_t_l_e_n, _i_n_t _*_g_i_d_s_e_t);

DDEESSCCRRIIPPTTIIOONN
     GGeettggrroouuppss() 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 num-
     ber of entries that may be placed in _g_i_d_s_e_t. GGeettggrroouuppss() returns the ac-
     tual number of groups returned in _g_i_d_s_e_t. No more than NGROUPS, as de-
     fined in <_s_y_s_/_p_a_r_a_m_._h>, will ever be returned.

RREETTUURRNN VVAALLUUEESS
     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.

EERRRROORRSS
     The possible errors for ggeettggrroouuppss() 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.

SSEEEE AALLSSOO
     setgroups(2),  initgroups(3)

BBUUGGSS
     The _g_i_d_s_e_t array should be of type _g_i_d___t _,
     but remains integer for compatibility with earlier systems.

HHIISSTTOORRYY
     The ggeettggrroouuppss function call appeared in 4.2BSD.

4.2 Berkeley Distribution        June 4, 1993                                1