#!/usr/bin/perl
#
# Runtime Info written by detour@metalshell.com
#
# Displays the PID, UID, GID, EUID, EGID, and the runtime priority
#
# http://www.metalshell.com
#
print "\nDisplay Runtime Info for $0\n";
print "----------------------------------\n";
print "PID # ( $$ )\n";
print "REAL UID # ( $< )\n";
print "EFFECTIVE UID # ( $> )\n";
print "REAL GID # ( $( )\n";
print "EFFECTIVE GID # ( $) )\n";
# getpriority(WHICH, WHO)
#
# WHICH = 0, 1 or 2 for process priority, process group, and user priority.
# WHO = 0 for current user
#
# getpriority may not work on all systems.
#
$priority = getpriority(0,0);
print "Priority # ( $priority )\n\n";
|