From 92ed9ca3127f323fa434b152815746eb57d6ceec Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 11 Jan 1998 22:01:20 +0000 Subject: Replace sys/param.h with sys/types.h as per POSIX. Document the special case of gidsetlen == 0. Partially obtained from: OpenBSD --- lib/libc/sys/getgroups.2 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/libc/sys') diff --git a/lib/libc/sys/getgroups.2 b/lib/libc/sys/getgroups.2 index ea73890..6a16d55 100644 --- a/lib/libc/sys/getgroups.2 +++ b/lib/libc/sys/getgroups.2 @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)getgroups.2 8.2 (Berkeley) 4/16/94 +.\" $Id$ .\" .Dd April 16, 1994 .Dt GETGROUPS 2 @@ -38,7 +39,7 @@ .Nm getgroups .Nd get group access list .Sh SYNOPSIS -.Fd #include +.Fd #include .Fd #include .Ft int .Fn getgroups "int gidsetlen" "gid_t *gidset" @@ -60,6 +61,13 @@ as defined in .Aq Pa sys/param.h , will ever be returned. +If +.Fa gidsetlen +is zero, +.Fn getgroups +returns the number of supplementary group IDs associated with +the calling process without modifying the array pointed to by +.Fa gidset . .Sh RETURN VALUES A successful call returns the number of groups in the group set. A value of -1 indicates that an error occurred, and the error -- cgit v1.1