The module for operating (UNIX) processes. Like Math module, all methods defined in this module are module functions.
Notice the Process
is not a class for process object, but the
module for methods to operate processes.
egid
Returns the current effective group ID of the process.
egid= gid
Sets the current effective group ID of the process to gid.
euid
Returns the current effective user ID of the process.
euid= uid
Sets the current effective user ID of the process to uid.
gid
Returns the current real group ID of the process.
gid= gid
Sets the current real group ID of the process to gid.
pid
Returns the process ID of the process, which is same to the value of
the variable `$$
'.
ppid
Returns the process ID of the parent process. Under UN*X, the process ID will be 1 (the pid of init) after the parent process terminates.
uid
Returns the real user ID of the process.
uid= uid
Sets the real user ID of the process to uid.
getpgrp([pid])
Returns the current process group for the pid, 0 for the current process. If PID is omitted, returns process group of current process.
getpriority(which, who)
Returns the current priority for a process, a process group, or a user. (See getpriority(2).) The Process module defines the constants for which, PRIO_PROCESS, PRIO_PGRP, PRIO_USER.
kill(signal, pid...)
Sends signal to the specified pid.
signal must be a string or a integer to specify the
signal to send. If the signal is negative (or -
before
the signal name), it kills process groups instead of processes.
setpgrp(pid, pgrp)
Sets the current process group for the PID, 0 for the current process.
setpriority(which, who, prio)
Sets the current priority for a process, a process group, or a user. (See setpriority(2).) The Process module defines the constants for which, PRIO_PROCESS, PRIO_PGRP, PRIO_USER.
wait
Waits for a child process to terminate and returns the pid of the
deceased process, or nil
if there are no child processes.
waitpid(pid, flags)
Waits for a particular child process specified by pid to
terminate and returns the pid of the deceased process. Returns
nil
if there is no such child process nor the process did
not terminated yet in the non-blocking mode. Non-blocking wait is
only available on machines supporting either the
waitpid(2) or wait4(2) system calls.
However, waiting for a particular pid with FLAGS of 0 is implemented
everywhere.
Specifies process priority for getpriority
/setpriority
.
Specifies process group priority.
Specifies user priority.
Means to return immediately if no child has exited.
Means to also return for children which are stopped, and whose status has not been reported.