John W. Krahn wrote:
Thanks john. I'm running Slackware10.1 and that didn't quit work for me. I
looked it up and there is the Real ID and the Effective ID. Here's the
quote:
"The $< and $> variables contain, respectively, the real user ID and
effective user ID for the program. The real user ID is the ID under which
the user of the program logged in. The effective user ID is the ID
associated with this particular program (which is not always the same as
the real user ID)."
So, I tried the Effective ID and it worked when I looked at the process from
another window. Here's the test code:
perl -e 'print "$> - $)\n";$>=getpwnam "nobody";$)=getgrnam
"nobody";sleep(5);print "$> - $)\n";'
Thanks for your help,