Available on crate feature
process
only.Expand description
Process-associated operations.
Structs§
CpuSet
represents a bit-mask of CPUs.gid_t
—A Unix group ID.- Reaper status as returned by
get_reaper_status
. pid_t
—A non-zero Unix process ID.- A child process of a reaper.
REAPER_PIDINFO_*
.- Reaper status as returned by
get_reaper_status
. REAPER_STATUS_*
.uid_t
—A Unix user ID.- Options for modifying the behavior of
waitid
. - The status of a process after calling
waitid
.
Enums§
PROC_TRACE_CTL_*
.- Subset of
idtype_t
C enum, with only the values allowed byprocctl
. - Tracing status as returned by
trace_status
. PROC_TRAPCAP_CTL_*
.- The identifier to wait on in a call to
waitid
.
Constants§
EXIT_FAILURE
for use withexit
.- The exit status used by a process terminated with a
Signal::Abort
signal. EXIT_SUCCESS
for use withexit
.
Functions§
- chdir
fs
chdir(path)
—Change the current working directory. - chroot
fs
chroot(path)
—Change the process root directory. fchdir(fd)
—Change the current working directory.- Get the list of descendants of the specified reaper process.
- Get information about the reaper of the specified process (or the process itself if it is a reaper).
- getcwd
fs
getCWD
—Return the current working directory. getegid()
—Returns the process’ effective group ID.geteuid()
—Returns the process’ effective user ID.getgid()
—Returns the process’ real group ID.getgroups()
—Return a list of the current user’s groups.getpgid(pid)
—Returns the process group ID of the given process.getpgrp()
—Returns the process’ group ID.getpid()
—Returns the process’ ID.getppid()
—Returns the parent process’ ID.getpriority(PRIO_PGRP, gid)
—Get the scheduling priority of the given process group.getpriority(PRIO_PROCESS, pid)
—Get the scheduling priority of the given process.getpriority(PRIO_USER, uid)
—Get the scheduling priority of the given user.getrlimit(resource)
—Get a process resource limit value.getsid(pid)
—Get the session ID of the given process.getuid()
—Returns the process’ real user ID.ioctl(fd, TIOCSCTTY, 0)
—Sets the controlling terminal for the process.kill(0, sig)
—Sends a signal to all processes in the current process group.kill(pid, sig)
—Sends a signal to a process.kill(-pid, sig)
—Sends a signal to all processes in a process group.nice(inc)
—Adjust the scheduling priority of the current process.- Check the
no_new_privs
mode of the specified process. - Get the current value of the parent process death signal.
- Deliver a signal to some subset of
sched_getaffinity(pid)
—Get a thread’s CPU affinity mask.sched_setaffinity(pid, cpuset)
—Set a thread’s CPU affinity mask.sched_yield()
—Hints to the OS that other processes should run.- Set the state of the
dumpable
attribute for the process indicated byidtype
andid
. This determines whether the process can be traced and whether core dumps are produced for the process upon delivery of a signal whose default behavior is to produce a core dump. - Enable the
no_new_privs
mode that ignores SUID and SGID bits onexecve
in the specified process and its future descendants. - Set the parent-death signal of the calling process.
- Acquire or release the reaper status of the calling process.
- Set the current value of the capability mode violation trapping behavior. If this behavior is enabled, the kernel would deliver a
Signal::Trap
signal on any return from a system call that would result in aio::Errno::NOTCAPABLE
or [
io::Errno::CAPMODE`] error. setpgid(pid, pgid)
—Sets the process group ID of the given process.setpriority(PRIO_PGRP, pgid)
—Get the scheduling priority of the given process group.setpriority(PRIO_PROCESS, pid)
—Get the scheduling priority of the given process.setpriority(PRIO_USER, uid)
—Get the scheduling priority of the given user.setrlimit(resource, new)
—Set a process resource limit value.setsid()
—Create a new session.kill(0, 0)
—Check validity of pid and permissions to send signals to the all processes in the current process group, without actually sending any signals.kill(pid, 0)
—Check validity of pid and permissions to send signals to the process, without actually sending any signals.kill(-pid, 0)
—Check validity of pid and permissions to send signals to all processes in the process group, without actually sending any signals.- Get the tracing status of the process indicated by
idtype
andid
. - Get the current value of the capability mode violation trapping behavior.
- umask
fs
umask(mask)
—Set the process file creation mask. wait(waitopts)
—Wait for any of the children of calling process to change state.waitid(_, _, _, opts)
—Wait for the specified child process to change state.waitpid(-pgid, waitopts)
—Wait for a process in a specific process group to change state.waitpid(pid, waitopts)
—Wait for a specific process to change state.
Type Aliases§
- A process selector for use with the
procctl
interface. - The raw integer value of a Unix group ID. A group identifier as a raw integer.
- The raw integer value of a Unix process ID. A process identifier as a raw integer.
- The raw integer value of a Unix user ID. A user identifier as a raw integer.