[DOC] Enhanced Process.groups related

* On some platforms (e.g., macOS), the user's default group access
  list may exceed `NGROUPS_MAX`.
* Use upcase "GID" instead of "gid" for other than variable names.
This commit is contained in:
Nobuyoshi Nakada 2022-01-19 11:50:04 +09:00
parent e7249294fb
commit 2f0f56bdca
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -6852,6 +6852,7 @@ maxgroups(void)
* - the result is sorted * - the result is sorted
* - the result includes effective GIDs * - the result includes effective GIDs
* - the result does not include duplicated GIDs * - the result does not include duplicated GIDs
* - the result size does not exceed the value of Process.maxgroups
* *
* You can make sure to get a sorted unique GID list of * You can make sure to get a sorted unique GID list of
* the current process by this expression: * the current process by this expression:
@ -6946,10 +6947,10 @@ proc_setgroups(VALUE obj, VALUE ary)
* *
* Initializes the supplemental group access list by reading the * Initializes the supplemental group access list by reading the
* system group database and using all groups of which the given user * system group database and using all groups of which the given user
* is a member. The group with the specified <em>gid</em> is also * is a member. The group with the specified _gid_ is also added to
* added to the list. Returns the resulting Array of the * the list. Returns the resulting Array of the GIDs of all the
* gids of all the groups in the supplementary group access list. Not * groups in the supplementary group access list. Not available on
* available on all platforms. * all platforms.
* *
* Process.groups #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] * Process.groups #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27]
* Process.initgroups( "mgranger", 30 ) #=> [30, 6, 10, 11] * Process.initgroups( "mgranger", 30 ) #=> [30, 6, 10, 11]
@ -6974,7 +6975,7 @@ proc_initgroups(VALUE obj, VALUE uname, VALUE base_grp)
* call-seq: * call-seq:
* Process.maxgroups -> integer * Process.maxgroups -> integer
* *
* Returns the maximum number of gids allowed in the supplemental * Returns the maximum number of GIDs allowed in the supplemental
* group access list. * group access list.
* *
* Process.maxgroups #=> 32 * Process.maxgroups #=> 32
@ -6994,7 +6995,7 @@ proc_getmaxgroups(VALUE obj)
* call-seq: * call-seq:
* Process.maxgroups= integer -> integer * Process.maxgroups= integer -> integer
* *
* Sets the maximum number of gids allowed in the supplemental group * Sets the maximum number of GIDs allowed in the supplemental group
* access list. * access list.
*/ */