Gnulib module: getgroups
Portability problems fixed by Gnulib:
- This function is missing on some platforms:
mingw, MSVC 9.
- On some platforms, this function fails to reject a negative count,
even though that is less than the size that would be returned:
- On Ultrix 4.3,
getgroups (0, NULL) always fails. See macro
- On very old systems, this function operated on an array of ‘int’,
even though that was a different size than an array of ‘gid_t’.
Portability problems not fixed by Gnulib:
- This function is unsafe to call between
the parent process is multi-threaded.
- It is unspecified whether the effective group id will be included in
the returned list, nor whether the list will be sorted in any
particular order. For that matter, some platforms include the
effective group id twice, if it is also a member of the current
supplemental group ids.
The Gnulib module
mgetgroups provides a similar API.