ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/qsygetgroups.htm

161 lines
5.3 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>qsygetgroups()--Get Supplemental Group IDs</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Unix2 SCRIPT J converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- This file has undergone html cleanup June 2002 by JET -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>qsygetgroups()--Get Supplemental Group IDs</h2>
<!-- =========================================== -->
<!-- S Y N T A X / P A R M T A B L E -->
<!-- =========================================== -->
<div class="box" style="width: 80%;">
<br>
&nbsp;&nbsp;Syntax<br>
<pre>
#include &lt;qsysetid.h&gt;
int qsygetgroups(int <em>gidsetsize</em>, gid_t <em>grouplist</em>[])
</pre>
&nbsp;&nbsp;Service Program Name: QSYSETIDS<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<!-- =========================================== -->
<!-- D E F I N I T I O N -->
<!-- =========================================== -->
<p>If the <em>gidsetsize</em> argument is zero, <strong>qsygetgroups()</strong>
returns the number of supplemental group IDs associated with the calling thread
without modifying the array pointed to by the <em>grouplist</em> argument.
Otherwise, <strong>qsygetgroups()</strong> fills in the array <em>
grouplist</em> with the supplementary group IDs of the calling thread and
returns the actual number of group IDs stored. The values of array entries with
indexes larger than or equal to the returned value are undefined.</p>
<!-- =========================================== -->
<!-- P A R A M E T E R S -->
<!-- =========================================== -->
<h3>Parameters</h3>
<dl>
<dt><strong><em>gidsetsize</em></strong></dt>
<dd>(Input) The number of elements in the supplied array <em>
grouplist</em>.<br>
<br>
</dd>
<dt><strong><em>grouplist</em></strong></dt>
<dd>(Output) The supplementary group IDs.</dd>
</dl>
<br>
<!-- =========================================== -->
<!-- A U T H O R I T I E S A N D L O C K S -->
<!-- =========================================== -->
<h3>Authorities</h3>
<p>No authorization is required.</p>
<!-- =========================================== -->
<!-- R E T U R N V A L U E -->
<!-- =========================================== --><br>
<h3>Return Value</h3>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top" nowrap><em>0 or &gt; 0</em></td>
<td align="left" valign="top"><strong>qsygetgroups()</strong> was successful.
If the <em>gidsetsize</em> argument is 0, the number of supplementary group IDs
is returned. If <em>gidsetsize</em> is greater than 0, the array <em>
grouplist</em> is filled with the supplementary group IDs of the calling thread
and the return value represents the actual number of group IDs stored.</td>
</tr>
<tr>
<td align="left" valign="top"><em>-1</em></td>
<td align="left" valign="top"><strong>qsygetgroups()</strong> was not
successful. The <em>errno</em> global variable is set to indicate the
error.</td>
</tr>
</table>
<br>
<br>
<!-- =========================================== -->
<!-- E R R O R C O N D I T I O N S -->
<!-- =========================================== -->
<h3>Error Conditions</h3>
<p>If <strong>qsygetgroups()</strong> is not successful, <em>errno</em> usually
indicates one of the following errors. Under some conditions, <em>errno</em>
could indicate an error other than those listed here.</p>
<table cellpadding="5">
<!-- cols="25 75" -->
<tr>
<th align="left" valign="bottom">Error condition</th>
<th align="left" valign="bottom">Additional information</th>
</tr>
<tr>
<td align="left" valign="top">
<em>[<a href="unix14.htm#EINVAL">EINVAL</a>]</em></td>
<td align="left" valign="top">The <em>gidsetsize</em> argument is not equal to zero and is less than the
number of group IDs.</td></tr>
</table>
<br>
<!-- =========================================== -->
<!-- -->
<!-- =========================================== --><br>
<hr>
API introduced: V5R2
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>