Expand description
Process-associated operations.
Structs§
CpuSet
represents a bit-mask of CPUs.- A Linux CPU ID.
PR_FPEMU_*
flags for use withfloating_point_emulation_control
andset_floating_point_emulation_control
.- Zero means floating point exceptions are disabled.
gid_t
—A Unix group ID.- A result from
membarrier_query
. pid_t
—A non-zero Unix process ID.PIDFD_*
flags for use withpidfd_open
.- All flags are reserved for future use.
- This structure provides new memory descriptor map which mostly modifies
/proc/pid/stat[m]
output for a task. This mostly done in a sake of checkpoint/restore functionality. PR_SPEC_*
flags for use withcontrol_speculative_feature
.- Zero means the processors are not vulnerable.
uid_t
—A Unix user ID.- Options for modifying the behavior of
waitid
. - The status of a process after calling
waitid
.
Enums§
PR_ENDIAN_*
values for use withendian_mode
.PR_MCE_KILL_*
values for use withmachine_check_memory_corruption_kill_policy
andset_machine_check_memory_corruption_kill_policy
.- A command for use with
membarrier
andmembarrier_cpu
. - Process ptracer.
PR_SET_MM_*
values for use withset_virtual_memory_map_address
.- 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(path)
—Change the current working directory.- Get the
child subreaper
setting of the calling process. chroot(path)
—Change the process root directory.- Put the process in the
IO_FLUSHER
state, allowing it to make progress when allocating memory. - Enable or disable all performance counters attached to the calling process.
- Set enabled pointer authentication keys.
- Provides one-shot access to all the addresses by passing in a
PrctlMmMap
. - Sets the state of the speculation misfeature.
- Get the current state of the calling process’
dumpable
attribute. - Get enabled pointer authentication keys.
- Get the endianness of the calling process.
fchdir(fd)
—Change the current working directory.- Get floating point emulation control bits.
- Get floating point exception mode.
- Get the current floating point mode.
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.- Get the
IO_FLUSHER
state of the caller. 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.- Get the current per-process machine check kill policy.
membarrier(cmd, 0, 0)
—Perform a memory barrier.membarrier(cmd, MEMBARRIER_CMD_FLAG_CPU, cpu)
—Perform a memory barrier with a specific CPU.membarrier(MEMBARRIER_CMD_QUERY, 0, 0)
—Query the supportedmembarrier
commands.nice(inc)
—Adjust the scheduling priority of the current process.- Get the current value of the parent process death signal.
syscall(SYS_pidfd_getfd, pidfd, flags)
—Obtain a duplicate of another process’ file descriptor.syscall(SYS_pidfd_open, pid, flags)
—Creates a file descriptor for a process.syscall(SYS_pidfd_send_signal, pidfd, sig, NULL, 0)
—Send a signal to a process specified by a file descriptor.pivot_root(new_root, put_old)
—Change the root mount.prlimit(pid, resource, new)
—Get and set a process resource limit value.sched_getaffinity(pid)
—Get a thread’s CPU affinity mask.sched_getcpu()
—Get the CPU that the current thread is currently on.sched_setaffinity(pid, cpuset)
—Set a thread’s CPU affinity mask.sched_yield()
—Hints to the OS that other processes should run.- Set a new auxiliary vector.
- Set the
child subreaper
attribute of the calling process. - Set the state of the
dumpable
attribute. - Set the endianness of the calling process.
- Supersede the
/proc/pid/exe
symbolic link with a new one pointing to a new executable file. - Set floating point emulation control bits.
- Set floating point exception mode.
- Allow control of the floating point mode from user space.
- Set the machine check memory corruption kill policy for the calling thread.
- Set the parent-death signal of the calling process.
- Declare that the ptracer process can
ptrace
the calling process as if it were a direct process ancestor. - Set the state of the flag determining if the timestamp counter can be read by the process.
- Set whether to use (normal, traditional) statistical process timing or accurate timestamp-based process timing.
- Set unaligned access control bits.
- Modify certain kernel memory map descriptor addresses of the calling process.
- Set the name for a virtual memory region.
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.- Get the state of the speculation misfeature.
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 state of the flag determining if the timestamp counter can be read.
- Get which process timing method is currently in use.
umask(mask)
—Set the process file creation mask.- Get unaligned access control bits.
- Get the size of the
PrctlMmMap
the kernel expects. 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§
- Raw file descriptor in another process.
- A group identifier as a raw integer.
- A process identifier as a raw integer.
- A user identifier as a raw integer.