summaryrefslogtreecommitdiff
path: root/pod/perlvar.pod
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2004-11-21 04:38:09 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-11-24 14:47:31 +0000
commita537debe17982e491ffa12d12441cf74a452acb2 (patch)
tree88b5f22feab2daef6d79e15617f0b8e89c53fae3 /pod/perlvar.pod
parent9829f96ec1845f7d042cbefc5feb25009405e3e6 (diff)
downloadperl-a537debe17982e491ffa12d12441cf74a452acb2.tar.gz
[perl #3242] [PATCH]No error on assignment to $>
From: "Steve Peters via RT" <perlbug-followup@perl.org> Message-ID: <rt-3.0.11-3242-100676.6.32723019025057@perl.org> p4raw-id: //depot/perl@23532
Diffstat (limited to 'pod/perlvar.pod')
-rw-r--r--pod/perlvar.pod12
1 files changed, 9 insertions, 3 deletions
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 8fc74417d7..292f444dfe 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -765,7 +765,9 @@ you may use the CPAN module C<Linux::Pid>.
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 @@ The effective uid of this process. Example:
($<,$>) = ($>,$<); # 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 @@ 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.
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 @@ list, say C< $) = "5 5" >.
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.)