pub struct PidEntry {
pub id: pid_t,
/* private fields */
}Expand description
Entities identified by a pid.
Fields§
§id: pid_tImplementations§
Source§impl PidEntry
impl PidEntry
pub fn get_task(&self) -> Result<Arc<Task>, Errno>
Sourcepub fn get_process_task(&self) -> Option<Arc<Task>>
pub fn get_process_task(&self) -> Option<Arc<Task>>
Returns a representative Task for this process, including when the thread-group
leader has exited or the process is an unreaped zombie.
pub fn get_process(&self) -> Option<ProcessEntryRef>
pub fn get_thread_group(&self) -> Result<Arc<ThreadGroup>, Errno>
Sourcepub fn is_process_group(&self, scope: &RcuReadScope) -> bool
pub fn is_process_group(&self, scope: &RcuReadScope) -> bool
Returns whether any member thread groups belong to this process group (PGID).
Sourcepub fn is_session(&self, scope: &RcuReadScope) -> bool
pub fn is_session(&self, scope: &RcuReadScope) -> bool
Returns whether any member thread groups belong to this session (SID).
Sourcepub fn pgid_thread_groups<'a>(
&'a self,
scope: &'a RcuReadScope,
) -> impl Iterator<Item = Arc<ThreadGroup>> + 'a
pub fn pgid_thread_groups<'a>( &'a self, scope: &'a RcuReadScope, ) -> impl Iterator<Item = Arc<ThreadGroup>> + 'a
Returns an iterator over the member thread groups in this process group (PGID).
Sourcepub fn sid_thread_groups<'a>(
&'a self,
scope: &'a RcuReadScope,
) -> impl Iterator<Item = Arc<ThreadGroup>> + 'a
pub fn sid_thread_groups<'a>( &'a self, scope: &'a RcuReadScope, ) -> impl Iterator<Item = Arc<ThreadGroup>> + 'a
Returns an iterator over the member thread groups in this session (SID).
Sourcepub fn is_process_group_in_session(
&self,
session: &PidEntry,
scope: &RcuReadScope,
) -> bool
pub fn is_process_group_in_session( &self, session: &PidEntry, scope: &RcuReadScope, ) -> bool
Returns whether this process group (PGID) is non-empty and belongs to session (SID).
Sourcepub fn clear_controlling_terminal(
&self,
matching: Option<(&Terminal, Option<TerminalSide>)>,
)
pub fn clear_controlling_terminal( &self, matching: Option<(&Terminal, Option<TerminalSide>)>, )
Clears the controlling terminal on all member thread groups in this session (SID).
If matching is Some((terminal, maybe_side)), only clears controlling_terminal
if it refers to terminal (and matches side if specified).
Sourcepub fn will_become_orphaned_pgrp(
&self,
scope: &RcuReadScope,
ignored_tg: Option<&ThreadGroup>,
) -> bool
pub fn will_become_orphaned_pgrp( &self, scope: &RcuReadScope, ignored_tg: Option<&ThreadGroup>, ) -> bool
Returns whether the process group represented by this PidEntry is orphaned.
An orphaned process group is one where every member’s parent is either in the same process group or outside the group’s session.
If ignored_tg is supplied, that thread group is ignored during traversal.
Sourcepub fn has_stopped_jobs(&self, scope: &RcuReadScope) -> bool
pub fn has_stopped_jobs(&self, scope: &RcuReadScope) -> bool
Returns whether any member in this process group is stopped by job control.
Sourcepub fn send_signals_to_pgid(&self, signals: &[Signal])
pub fn send_signals_to_pgid(&self, signals: &[Signal])
Dispatches signals to all member thread groups in this process group.
Signals are delivered in order: each signal in signals is delivered to all
group members before the subsequent signal is dispatched.
Trait Implementations§
impl Eq for PidEntry
Source§impl Ord for PidEntry
impl Ord for PidEntry
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for PidEntry
impl PartialOrd for PidEntry
impl RcuDroppable for PidEntrywhere
pid_t: RcuDroppable,
RcuWeak<Task>: RcuDroppable,
RcuOptionBox<ProcessEntry>: RcuDroppable,
RcuIntrusiveList<ThreadGroupLinkNode, ThreadGroupLinkAdapter>: RcuDroppable,
Auto Trait Implementations§
impl !Freeze for PidEntry
impl !RefUnwindSafe for PidEntry
impl !UnwindSafe for PidEntry
impl Send for PidEntry
impl Sync for PidEntry
impl Unpin for PidEntry
impl UnsafeUnpin for PidEntry
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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