2 @section @code{getgroups}
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/getgroups.html}
7 Gnulib module: getgroups
9 Portability problems fixed by Gnulib:
12 This function is missing on some platforms:
15 On some platforms, this function fails to reject a negative count,
16 even though that is less than the size that would be returned:
19 On Ultrix 4.3, @code{getgroups (0, NULL)} always fails. See macro
20 @samp{AC_FUNC_GETGROUPS}.
22 On very old systems, this function operated on an array of @samp{int},
23 even though that was a different size than an array of @samp{gid_t}.
26 Portability problems not fixed by Gnulib:
29 This function is unsafe to call between @code{fork} and @code{exec} if
30 the parent process is multi-threaded.
32 It is unspecified whether the effective group id will be included in
33 the returned list, nor whether the list will be sorted in any
34 particular order. For that matter, some platforms include the
35 effective group id twice, if it is also a member of the current
36 supplemental group ids.
39 The Gnulib module @code{mgetgroups} provides a similar API.