std::runtime::process
Source: std/runtime/process.slk
This is the exact canonical documentation page for std::runtime::process.
Role#
std::runtime::process is an implementation-facing runtime module in the shipped std/** tree.
It exists so higher-level stdlib surfaces can delegate platform or runtime-specific behavior without changing their public module names.
Canonical Context#
Use the following owning docs for the substantive API/design context for this module:
Notes#
- The shipped source for this module is
std/runtime/process.slk. - The canonical module name is
std::runtime::process. - It includes the implementation-facing
executable_path_ownedbridge used bystd::process::executable_path. - It includes the
effective_user_idbridge used bystd::process::effective_user_id; hosted POSIX delegates togeteuid(2)and widens itsu32ABI result tou64, while WASI Preview 1 returns its documented zero placeholder. - It provides implementation-facing
set_process_group_selfandkill_process_groupoperations for the checked ownership surface instd::process::child. The setter can only place the calling child into a group led by itself; the signal helper requires a positive, private group identity and negates it internally for POSIXkill(2). - This page is intentionally implementation-oriented. Downstream users should usually start with the higher-level std module docs listed above unless they are working on the runtime layer itself.
The internal apply_resource_limits(cpu: u64, address_space: u64) -> int
helper applies hard/soft CPU and address-space limits and zero core limits in
the current process. It returns zero or a native errno, and is called only in
a pre-exec child; partial failure has no rollback.
apply_data_limit(bytes: u64) -> int installs equal finite, positive
RLIMIT_DATA soft/hard limits in a disposable child. Zero means success;
otherwise the return value is errno. No parent-side limit is modified.
Source repository · Edit this page · View Markdown