doc.rust-lang.org
fn exec(&mut self) -> io::Error
...For example the working directory, environment variables, signal handling settings, various user/group information, or aspects of stdio file descriptors may have changed. If a "transactional spawn" is required to gracefully handle errors it is recommended to use the cross-platform spawn instead.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn handle_alloc_error(layout: Layout) -> never
handle_alloc_error — Signals a memory allocation error.
Callers of memory allocation APIs wishing to cease execution in response to an allocation error are encouraged to call this function, rather than directly invoking panic! or similar.
This function is guaranteed to diverge (not return normally with a value), but depending...
function
alloc
Stable since 1.28.0
Version 1.100.0-nightly
doc.rust-lang.org
fn signal(&self) -> Option<i32>
...use std::os::unix::process::ExitStatusExt;
use std::process::ExitStatus;
let sigterm = 15;
let status = ExitStatus::from_raw(sigterm);
assert_eq!(status.code(), None);
assert_eq!(status.signal(), Some(sigterm));
A process that receives a signal may catch and handle it, then exit normally with an exit code. When that...
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn spawn(&mut self) -> io::Result<Child>
Command::spawn — Executes the command as a child process, returning a handle to it.
By default, stdin, stdout and stderr are inherited from the parent.
Errors
This method returns an io::Error if the child process could not be spawned. Common reasons include:
• the program could not be found (for...
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn max(self, other: f32) -> f32
...The handling of NaNs follows the IEEE 754-2019 semantics for maximumNumber, treating all NaNs the same way to ensure the operation is associative. The handling of signed zeros follows the IEEE 754-2008 semantics for maxNum.
let x = 1.0f32;
let y = 2.0f32;
assert_eq!(x.max(y...
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn min(self, other: f32) -> f32
...The handling of NaNs follows the IEEE 754-2019 semantics for minimumNumber, treating all NaNs the same way to ensure the operation is associative. The handling of signed zeros follows the IEEE 754-2008 semantics for minNum.
let x = 1.0f32;
let y = 2.0f32;
assert_eq!(x.min(y...
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn max(self, other: f64) -> f64
...The handling of NaNs follows the IEEE 754-2019 semantics for maximumNumber, treating all NaNs the same way to ensure the operation is associative. The handling of signed zeros follows the IEEE 754-2008 semantics for maxNum.
let x = 1.0_f64;
let y = 2.0_f64;
assert_eq!(x...
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn min(self, other: f64) -> f64
...The handling of NaNs follows the IEEE 754-2019 semantics for minimumNumber, treating all NaNs the same way to ensure the operation is associative. The handling of signed zeros follows the IEEE 754-2008 semantics for minNum.
let x = 1.0_f64;
let y = 2.0_f64;
assert_eq!(x...
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn park()
...park blocks the current thread, which can then be resumed from another thread by calling the unpark method on the blocked thread's handle.
Conceptually, each Thread handle has an associated token, which is initially not present:
•
The thread::park function blocks the current thread unless or until the token...
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn _mm_setcsr(val: u32)
...This register controls how SIMD instructions handle floating point operations. Modifying this register only affects the current thread.
It contains several groups of flags:
•
Exception flags report which exceptions occurred since last they were reset.
•
Masking flags can be used to mask (ignore) certain exceptions. By default these flags are...
function
core
Stable since 1.27.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod sync
...In single-threaded scenarios, this can cause issues when writing signal handlers or certain kinds of low-level code. Use compiler fences to prevent this reordering.
•
A single processor executing instructions out-of-order: Modern CPUs are capable of superscalar execution, i.e., multiple instructions might be executing at the...
module
std
Stable since 1.0.0
Version 1.100.0-nightly