getgroups.2
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 69 行
2
69 行
.\" SCCSID: @(#)getgroups.2 3.1 11/23/87.\" Last modified by MJT on 3-Jul-86 0838.\" Merged RR and Jenkins changes with latest library version. Sigh..\".TH getgroups 2.SH Namegetgroups \- get group access list.SH Syntax.nf#include <sys/types.h>#include <unistd.h>.PPint getgroups(\fIgidsetsize, grouplist\fP) int \fIgidsetsize\fP;int \fIgrouplist\fP[];.fi.SH Description.NXR "getgroups system call".NXR "group access list" "getting"The .PN getgroupscall gets the current group access list of the user processand stores it in the array of int .IR grouplist .The .I gidsetsizeparameter indicates the number of entries that can be placed in .IR grouplist ..SH Return ValuesUpon success, the call returns the number of groups as the value of the function.No more than NGROUPS, as defined in <sys/param.h>, arereturned..PPA value of \-1 indicates that an error occurred, and the errorcode is stored in the global variable, \fIerrno\fP\|..SH DiagnosticsThe .PN getgroupscall fails under the following conditions: .TP 15[EINVAL]The .I gidsetsizeargument is smaller than the number of groups in the group set..TP 15[EFAULT]The \fIgrouplist\fP argument specifiesinvalid addresses..SH Environment.SS POSIXWhen your program is compiled in the POSIX environment, the.IR grouplistargument should be defined as follows:.sp.ft Bgid_t grouplist[];.PPAdditionally, in the POSIX environment, if the .IR gidsetsize argument is zero,.PN getgroupsreturns the number of supplemental group IDs associated with the calling process, without modifying the array pointed to by the .IR grouplistargument..SH See Alsosetgroups(2), initgroups(3x)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?