Change 23532 by [EMAIL PROTECTED] on 2004/11/24 14:47:31
Subject: [perl #3242] [PATCH]No error on assignment to $>
From: "Steve Peters via RT" <[EMAIL PROTECTED]>
Date: 21 Nov 2004 04:38:09 -0000
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/pod/perlvar.pod#134 edit
Differences ...
==== //depot/perl/pod/perlvar.pod#134 (text) ====
Index: perl/pod/perlvar.pod
--- perl/pod/perlvar.pod#133~22263~ Tue Feb 3 11:41:11 2004
+++ perl/pod/perlvar.pod Wed Nov 24 06:47:31 2004
@@ -765,7 +765,9 @@
The real uid of this process. (Mnemonic: it's the uid you came I<from>,
if you're running setuid.) You can change both the real uid and
-the effective uid at the same time by using POSIX::setuid().
+the effective uid at the same time by using POSIX::setuid(). Since
+changes to $< require a system call, check $! after a change attempt to
+detect any possible errors.
=item $EFFECTIVE_USER_ID
@@ -779,7 +781,8 @@
($<,$>) = ($>,$<); # swap real and effective uid
You can change both the effective uid and the real uid at the same
-time by using POSIX::setuid().
+time by using POSIX::setuid(). Changes to $> require a check to $!
+to detect any possible errors after an attempted change.
(Mnemonic: it's the uid you went I<to>, if you're running setuid.)
C<< $< >> and C<< $> >> can be swapped only on machines
@@ -802,7 +805,8 @@
back to C<$(> without being forced numeric, such as by adding zero.
You can change both the real gid and the effective gid at the same
-time by using POSIX::setgid().
+time by using POSIX::setgid(). Changes to $( require a check to $!
+to detect any possible errors after an attempted change.
(Mnemonic: parentheses are used to I<group> things. The real gid is the
group you I<left>, if you're running setgid.)
@@ -828,6 +832,8 @@
You can change both the effective gid and the real gid at the same
time by using POSIX::setgid() (use only a single numeric argument).
+Changes to $) require a check to $! to detect any possible errors
+after an attempted change.
(Mnemonic: parentheses are used to I<group> things. The effective gid
is the group that's I<right> for you, if you're running setgid.)
End of Patch.