pub struct ProcessTable { /* private fields */ }Implementations§
Source§impl ProcessTable
impl ProcessTable
pub fn new() -> Self
pub fn with_zombie_ttl(zombie_ttl: Duration) -> Self
pub fn allocate_pid(&self) -> ProcessResult<u32>
pub fn set_on_process_exit( &self, callback: Option<Arc<dyn Fn(u32) + Send + Sync + 'static>>, )
pub fn register( &self, pid: u32, driver: impl Into<String>, command: impl Into<String>, args: Vec<String>, ctx: ProcessContext, driver_process: Arc<dyn DriverProcess>, ) -> ProcessEntry
pub fn get(&self, pid: u32) -> Option<ProcessEntry>
pub fn zombie_timer_count(&self) -> usize
pub fn zombie_reaper_thread_spawn_count(&self) -> usize
pub fn running_count(&self) -> usize
pub fn mark_exited(&self, pid: u32, exit_code: i32)
pub fn mark_stopped(&self, pid: u32, signal: i32)
pub fn mark_continued(&self, pid: u32)
pub fn waitpid(&self, pid: u32) -> ProcessResult<(u32, i32)>
pub fn waitpid_for( &self, waiter_pid: u32, pid: i32, flags: WaitPidFlags, ) -> ProcessResult<Option<ProcessWaitResult>>
pub fn kill(&self, pid: i32, signal: i32) -> ProcessResult<()>
pub fn setpgid(&self, pid: u32, pgid: u32) -> ProcessResult<()>
pub fn getpgid(&self, pid: u32) -> ProcessResult<u32>
pub fn setsid(&self, pid: u32) -> ProcessResult<u32>
pub fn getsid(&self, pid: u32) -> ProcessResult<u32>
pub fn getppid(&self, pid: u32) -> ProcessResult<u32>
pub fn get_umask(&self, pid: u32) -> ProcessResult<u32>
pub fn set_umask(&self, pid: u32, umask: u32) -> ProcessResult<u32>
pub fn has_process_group(&self, pgid: u32) -> bool
pub fn list_processes(&self) -> BTreeMap<u32, ProcessInfo>
pub fn terminate_all(&self)
pub fn sigprocmask( &self, pid: u32, how: SigmaskHow, set: SignalSet, ) -> ProcessResult<SignalSet>
pub fn sigpending(&self, pid: u32) -> ProcessResult<SignalSet>
Trait Implementations§
Source§impl Clone for ProcessTable
impl Clone for ProcessTable
Source§fn clone(&self) -> ProcessTable
fn clone(&self) -> ProcessTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProcessTable
impl RefUnwindSafe for ProcessTable
impl Send for ProcessTable
impl Sync for ProcessTable
impl Unpin for ProcessTable
impl UnsafeUnpin for ProcessTable
impl UnwindSafe for ProcessTable
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<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>
Converts
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>
Converts
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