pub struct SessionDisassociation { /* private fields */ }Expand description
Represents the disassociation of a session’s controlling terminal when the session leader exits.
This struct wraps an optional session and ensures that disassociate_controlling_terminal
is explicitly called by the caller, which must be done without holding any
ThreadGroup’s write lock.
Implementations§
Source§impl SessionDisassociation
impl SessionDisassociation
Sourcepub fn disassociate_controlling_terminal<L>(self, locked: &mut Locked<L>)where
L: LockBefore<ProcessGroupState>,
pub fn disassociate_controlling_terminal<L>(self, locked: &mut Locked<L>)where
L: LockBefore<ProcessGroupState>,
Disassociates the controlling terminal from the session.
If the exiting thread group is the session leader, the controlling terminal must be disassociated. This must be called after dropping the ThreadGroup write lock to prevent a lock order violation.
Calling it after the thread group has left the process group also ensures that the exiting thread group is no longer in the process group when attempting to send SIGHUP/SIGCONT to the foreground process group, avoiding a self-deadlock where the exiting thread group attempts to write-lock itself.
Auto Trait Implementations§
impl Freeze for SessionDisassociation
impl !RefUnwindSafe for SessionDisassociation
impl Send for SessionDisassociation
impl Sync for SessionDisassociation
impl Unpin for SessionDisassociation
impl UnsafeUnpin for SessionDisassociation
impl !UnwindSafe for SessionDisassociation
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]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