getuid {unix} | R Documentation |
Process Info
Description
Get or set attributes of the current process.
Usage
getuid()
getgid()
geteuid()
getegid()
getpid()
getppid()
getpgid()
getpriority()
setuid(uid)
seteuid(uid)
setgid(gid)
setegid(gid)
setpgid(pgid = 0)
setpriority(prio)
kill(pid, signal = SIGTERM)
Arguments
uid |
User ID from |
gid |
Group ID from |
pgid |
Process Group ID. Default |
prio |
Priority level |
pid |
process ID (integer) |
signal |
a signal number (integer), defaults to tools::SIGTERM. |
Details
Acronyms stand for:
-
pid
Process ID -
ppid
Parent-Process ID -
pgid
Process-Group ID -
uid
User ID -
euid
Effective User ID -
gid
Group ID -
egid
Effective Group ID -
prio
Priority level
An unprivileged (non-root) process cannot change it's uid
and only lower
process priority (higher value).
References
GETUID(2) GETPID(2) GETPGID(2) GETPRIORITY(2)
Examples
# Current User:
getuid()
# Current UserGroup:
getgid()
# Current UserGroup:
geteuid()
# Current UserGroup:
getegid()
# Process ID
getpid()
# parent PID:
getppid()
# Process group id:
getpgid()
# Detach process group
setpgid(0)
getpgid()
# Process priority:
getpriority()
# Decrease priority
setpriority(getpriority() + 1)
[Package unix version 1.5.8 Index]