pub struct PlatformEmergencySignal { /* private fields */ }Expand description
Opaque, non-reap-capable emergency termination capability.
It can be used while the actor has a pending wait on
PlatformLifecycle, but it cannot observe or consume the exit result.
Implementations§
Source§impl PlatformEmergencySignal
impl PlatformEmergencySignal
Sourcepub fn kill(&self) -> Result<()>
pub fn kill(&self) -> Result<()>
Request immediate termination without waiting for process reaping.
Sourcepub fn terminate_group_soft(&self) -> Result<bool>
pub fn terminate_group_soft(&self) -> Result<bool>
Ask the child’s whole process group to shut down gracefully.
Returns Ok(false) when the child was not spawned with
SpawnSpec::create_process_group: there is no group to address, and
signalling anyway would hit the caller’s own group on POSIX or the
caller’s console on Windows. A missing or mismatched launch identity
instead reports an unavailable target; it never falls back to a
numeric group identifier that might have been reused.
Sourcepub fn terminate_group_soft_legacy(&self) -> Result<bool>
pub fn terminate_group_soft_legacy(&self) -> Result<bool>
Legacy AsyncProcess-only graceful group termination.
Most hosts retain an identity-safe asynchronous signal capability. On
macOS there is no pidfd-equivalent for the Tokio child path, while the
pre-session AsyncProcess contract historically sent SIGTERM to the
launch child’s numeric process group. Preserve that established
best-effort behavior only for the legacy actor; sessions keep using
Self::terminate_group_soft and therefore remain identity-safe.
Auto Trait Implementations§
impl Freeze for PlatformEmergencySignal
impl RefUnwindSafe for PlatformEmergencySignal
impl Send for PlatformEmergencySignal
impl Sync for PlatformEmergencySignal
impl Unpin for PlatformEmergencySignal
impl UnsafeUnpin for PlatformEmergencySignal
impl UnwindSafe for PlatformEmergencySignal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more