Message-ID: <
20070503172713.GA23180@sirius.otherwize.co.uk>
p4raw-id: //depot/perl@31137
Sets the real group identifier and the effective group identifier for
this process. Similar to assigning a value to the Perl's builtin
-C<$)> variable, see L<perlvar/$GID>, except that the latter
+C<$)> variable, see L<perlvar/$EGID>, except that the latter
will change only the real user identifier, and that the setgid()
uses only a single numeric argument, as opposed to a space-separated
list of numbers.
However, a value assigned to C<$(> must be a single number used to
set the real gid. So the value given by C<$(> should I<not> be assigned
-back to C<$(> without being forced numeric, such as by adding zero.
+back to C<$(> without being forced numeric, such as by adding zero. Note
+that this is different to the effective gid (C<$)>) which does take a
+list.
You can change both the real gid and the effective gid at the same
time by using POSIX::setgid(). Changes to $( require a check to $!