Module process

Module process 

Source
Available on crate feature process only.
Expand description

Process-associated operations.

Structs§

FloatingPointEmulationControllinux_kernel
PR_FPEMU_* flags for use with floating_point_emulation_control and set_floating_point_emulation_control.
FloatingPointExceptionModelinux_kernel
Zero means floating point exceptions are disabled.
FlockNeither Emscripten nor target_os=espidf nor Fuchsia nor Redox nor target_os=vita nor WASI and non-target_os=horizon
File lock data structure used in fcntl_getlk.
Gid
gid_t—A Unix group ID.
Pid
pid_t—A non-zero Unix process ID.
PidfdFlagsLinux
PIDFD_* flags for use with pidfd_open.
PidfdGetfdFlagsLinux
All flags are reserved for future use.
PrctlMmMaplinux_kernel
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.
RlimitNeither target_os=espidf nor Fuchsia nor target_os=horizon nor Redox nor target_os=vita nor WASI
struct rlimit—Current and maximum values used in getrlimit, setrlimit, and prlimit.
Signal
A signal number for use with kill_process, kill_process_group, and kill_current_process_group.
SpeculationFeatureControllinux_kernel
PR_SPEC_* flags for use with control_speculative_feature.
SpeculationFeatureStatelinux_kernel
Zero means the processors are not vulnerable.
Uid
uid_t—A Unix user ID.
UnalignedAccessControllinux_kernel
PR_UNALIGN_* flags for use with unaligned_access_control and set_unaligned_access_control.
WaitIdOptionsNeither target_os=espidf nor target_os=vita nor WASI
Options for modifying the behavior of waitid.
WaitIdStatusNeither target_os=espidf nor target_os=vita nor WASI and neither target_os=horizon nor OpenBSD nor Redox nor WASI
The status of a process after calling waitid.
WaitOptionsNeither target_os=espidf nor target_os=vita nor WASI
Options for modifying the behavior of wait/waitpid.
WaitStatusNeither target_os=espidf nor target_os=vita nor WASI
The status of a child process after calling wait/waitpid.

Enums§

DumpableBehaviorlinux_kernel
SUID_DUMP_* values for use with dumpable_behavior and set_dumpable_behavior.
EndianModelinux_kernel
PR_ENDIAN_* values for use with endian_mode.
FloatingPointModelinux_kernel
PR_FP_MODE_* values for use with floating_point_mode and set_floating_point_mode.
FlockOffsetTypeNeither Emscripten nor target_os=espidf nor Fuchsia nor Redox nor target_os=vita nor WASI and non-target_os=horizon
F_SEEK* constants for use with fcntl_getlk.
FlockTypeNeither Emscripten nor target_os=espidf nor Fuchsia nor Redox nor target_os=vita nor WASI and non-target_os=horizon
F_*LCK constants for use with fcntl_getlk.
MachineCheckMemoryCorruptionKillPolicylinux_kernel
PR_MCE_KILL_* values for use with machine_check_memory_corruption_kill_policy and set_machine_check_memory_corruption_kill_policy.
PTracerlinux_kernel
Process ptracer.
Resource
A resource value for use with getrlimit, setrlimit, and prlimit.
SpeculationFeaturelinux_kernel
PR_SPEC_* values for use with speculative_feature_state and control_speculative_feature.
TimeStampCounterReadabilitylinux_kernel
PR_TSC_* values for use with time_stamp_counter_readability and set_time_stamp_counter_readability.
TimingMethodlinux_kernel
PR_TIMING_* values for use with timing_method and set_timing_method.
VirtualMemoryMapAddresslinux_kernel
PR_SET_MM_* values for use with set_virtual_memory_map_address.
WaitIdNeither target_os=espidf nor target_os=vita nor WASI and neither OpenBSD nor Redox nor WASI
The identifier to wait on in a call to waitid.

Constants§

EXIT_FAILURE
EXIT_FAILURE for use with exit.
EXIT_SIGNALED_SIGABRTNeither target_os=espidf nor WASI
The exit status used by a process terminated with a Signal::ABORT signal.
EXIT_SUCCESS
EXIT_SUCCESS for use with exit.

Functions§

chdirfs
chdir(path)—Change the current working directory.
child_subreaperlinux_kernel
Get the child subreaper setting of the calling process.
chrootfs
chroot(path)—Change the process root directory.
configure_io_flusher_behaviorlinux_kernel
Put the process in the IO_FLUSHER state, allowing it to make progress when allocating memory.
configure_performance_counterslinux_kernel
Enable or disable all performance counters attached to the calling process.
configure_pointer_authentication_keyslinux_kernel and linux_raw_dep
Set enabled pointer authentication keys.
configure_virtual_memory_maplinux_kernel
Provides one-shot access to all the addresses by passing in a PrctlMmMap.
control_speculative_featurelinux_kernel
Sets the state of the speculation misfeature.
dumpable_behaviorlinux_kernel
Get the current state of the calling process’ dumpable attribute.
enabled_pointer_authentication_keyslinux_kernel and linux_raw_dep
Get enabled pointer authentication keys.
endian_modelinux_kernel
Get the endianness of the calling process.
fchdirNon-WASI and non-Fuchsia
fchdir(fd)—Change the current working directory.
fcntl_getlkNeither Emscripten nor target_os=espidf nor Fuchsia nor target_os=horizon nor Redox nor target_os=vita nor WASI
fcntl(fd, F_GETLK)—Get the first lock that blocks the lock description pointed to by the argument lock. If no such lock is found, then None is returned.
floating_point_emulation_controllinux_kernel
Get floating point emulation control bits.
floating_point_exception_modelinux_kernel
Get floating point exception mode.
floating_point_modelinux_kernel
Get the current floating point mode.
getcwdfs and alloc
getcwd—Return the current working directory.
getegidNon-WASI
getegid()—Returns the process’ effective group ID.
geteuidNon-WASI
geteuid()—Returns the process’ effective user ID.
getgidNon-WASI
getgid()—Returns the process’ real group ID.
getgroupsalloc
getgroups()—Return a list of the current user’s groups.
getpgidNon-WASI
getpgid(pid)—Returns the process group ID of the given process.
getpgrpNon-WASI
getpgrp()—Returns the process’ group ID.
getpidNon-WASI
getpid()—Returns the process’ ID.
getppidNon-WASI
getppid()—Returns the parent process’ ID.
getpriority_pgrpNeither Fuchsia nor target_os=vita nor WASI and neither target_os=espidf nor target_os=horizon
getpriority(PRIO_PGRP, gid)—Get the scheduling priority of the given process group.
getpriority_processNeither Fuchsia nor target_os=vita nor WASI and neither target_os=espidf nor target_os=horizon
getpriority(PRIO_PROCESS, pid)—Get the scheduling priority of the given process.
getpriority_userNeither Fuchsia nor target_os=vita nor WASI and neither target_os=espidf nor target_os=horizon
getpriority(PRIO_USER, uid)—Get the scheduling priority of the given user.
getrlimitNeither target_os=espidf nor Fuchsia nor target_os=horizon nor Redox nor target_os=vita nor WASI
getrlimit(resource)—Get a process resource limit value.
getsidNon-WASI and non-Redox
getsid(pid)—Get the session ID of the given process.
getuidNon-WASI
getuid()—Returns the process’ real user ID.
ioctl_tiocscttyNeither target_os=aix nor target_os=espidf nor target_os=vita and neither Windows nor target_os=aix nor target_os=horizon nor Redox nor WASI
ioctl(fd, TIOCSCTTY, 0)—Sets the controlling terminal for the process.
is_io_flusherlinux_kernel
Get the IO_FLUSHER state of the caller.
kill_current_process_groupNeither target_os=espidf nor WASI
kill(0, sig)—Sends a signal to all processes in the current process group.
kill_processNeither target_os=espidf nor WASI
kill(pid, sig)—Sends a signal to a process.
kill_process_groupNeither target_os=espidf nor WASI
kill(-pid, sig)—Sends a signal to all processes in a process group.
machine_check_memory_corruption_kill_policylinux_kernel
Get the current per-process machine check kill policy.
niceNeither Fuchsia nor target_os=vita nor WASI
nice(inc)—Adjust the scheduling priority of the current process.
parent_process_death_signallinux_kernel
Get the current value of the parent process death signal.
pidfd_getfdLinux
syscall(SYS_pidfd_getfd, pidfd, flags)—Obtain a duplicate of another process’ file descriptor.
pidfd_openLinux
syscall(SYS_pidfd_open, pid, flags)—Creates a file descriptor for a process.
pidfd_send_signalLinux
syscall(SYS_pidfd_send_signal, pidfd, sig, NULL, 0)—Send a signal to a process specified by a file descriptor.
pivot_rootfs
pivot_root(new_root, put_old)—Change the root mount.
prlimitNeither target_os=espidf nor Fuchsia nor target_os=horizon nor Redox nor target_os=vita nor WASI and linux_kernel
prlimit(pid, resource, new)—Get and set a process resource limit value.
set_auxiliary_vectorlinux_kernel
Set a new auxiliary vector.
set_child_subreaperlinux_kernel
Set the child subreaper attribute of the calling process.
set_dumpable_behaviorlinux_kernel
Set the state of the dumpable attribute.
set_endian_modelinux_kernel
Set the endianness of the calling process.
set_executable_filelinux_kernel
Supersede the /proc/pid/exe symbolic link with a new one pointing to a new executable file.
set_floating_point_emulation_controllinux_kernel
Set floating point emulation control bits.
set_floating_point_exception_modelinux_kernel
Set floating point exception mode.
set_floating_point_modelinux_kernel
Allow control of the floating point mode from user space.
set_machine_check_memory_corruption_kill_policylinux_kernel
Set the machine check memory corruption kill policy for the calling thread.
set_parent_process_death_signallinux_kernel
Set the parent-death signal of the calling process.
set_ptracerlinux_kernel
Declare that the ptracer process can ptrace the calling process as if it were a direct process ancestor.
set_time_stamp_counter_readabilitylinux_kernel
Set the state of the flag determining if the timestamp counter can be read by the process.
set_timing_methodlinux_kernel
Set whether to use (normal, traditional) statistical process timing or accurate timestamp-based process timing.
set_unaligned_access_controllinux_kernel
Set unaligned access control bits.
set_virtual_memory_map_addresslinux_kernel
Modify certain kernel memory map descriptor addresses of the calling process.
set_virtual_memory_region_namelinux_kernel
Set the name for a virtual memory region.
setpgidNon-WASI
setpgid(pid, pgid)—Sets the process group ID of the given process.
setpriority_pgrpNeither Fuchsia nor target_os=vita nor WASI and neither target_os=espidf nor target_os=horizon
setpriority(PRIO_PGRP, pgid)—Get the scheduling priority of the given process group.
setpriority_processNeither Fuchsia nor target_os=vita nor WASI and neither target_os=espidf nor target_os=horizon
setpriority(PRIO_PROCESS, pid)—Get the scheduling priority of the given process.
setpriority_userNeither Fuchsia nor target_os=vita nor WASI and neither target_os=espidf nor target_os=horizon
setpriority(PRIO_USER, uid)—Get the scheduling priority of the given user.
setrlimitNeither target_os=espidf nor Fuchsia nor target_os=horizon nor Redox nor target_os=vita nor WASI
setrlimit(resource, new)—Set a process resource limit value.
setsidNon-WASI
setsid()—Create a new session.
speculative_feature_statelinux_kernel
Get the state of the speculation misfeature.
test_kill_current_process_groupNeither target_os=espidf nor WASI
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.
test_kill_processNeither target_os=espidf nor WASI
kill(pid, 0)—Check validity of pid and permissions to send signals to the process, without actually sending any signals.
test_kill_process_groupNeither target_os=espidf nor WASI
kill(-pid, 0)—Check validity of pid and permissions to send signals to all processes in the process group, without actually sending any signals.
time_stamp_counter_readabilitylinux_kernel
Get the state of the flag determining if the timestamp counter can be read.
timing_methodlinux_kernel
Get which process timing method is currently in use.
umaskfs
umask(mask)—Set the process file creation mask.
unaligned_access_controllinux_kernel
Get unaligned access control bits.
virtual_memory_map_config_struct_sizelinux_kernel
Get the size of the PrctlMmMap the kernel expects.
waitNeither target_os=espidf nor target_os=vita nor WASI and non-WASI
wait(waitopts)—Wait for any of the children of calling process to change state.
waitidNeither target_os=espidf nor target_os=vita nor WASI and neither Cygwin nor target_os=horizon nor OpenBSD nor Redox nor WASI
waitid(_, _, _, opts)—Wait for the specified child process to change state.
waitpgidNeither target_os=espidf nor target_os=vita nor WASI and non-WASI
waitpid(-pgid, waitopts)—Wait for a process in a specific process group to change state.
waitpidNeither target_os=espidf nor target_os=vita nor WASI and non-WASI
waitpid(pid, waitopts)—Wait for a specific process to change state.

Type Aliases§

ForeignRawFdLinux
Raw file descriptor in another process.
RawGid
A group identifier as a raw integer.
RawPid
A process identifier as a raw integer.
RawUid
A user identifier as a raw integer.