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 register_with_process_group( &self, pid: u32, driver: impl Into<String>, command: impl Into<String>, args: Vec<String>, ctx: ProcessContext, driver_process: Arc<dyn DriverProcess>, requested_pgid: Option<u32>, ) -> ProcessResult<ProcessEntry>
pub fn get(&self, pid: u32) -> Option<ProcessEntry>
pub fn set_identity( &self, pid: u32, identity: ProcessIdentity, ) -> ProcessResult<()>
pub fn inherited_context( &self, parent_pid: u32, ) -> ProcessResult<ProcessContext>
Sourcepub fn exec(
&self,
pid: u32,
driver: impl Into<String>,
command: impl Into<String>,
args: Vec<String>,
env: BTreeMap<String, String>,
cwd: String,
) -> ProcessResult<()>
pub fn exec( &self, pid: u32, driver: impl Into<String>, command: impl Into<String>, args: Vec<String>, env: BTreeMap<String, String>, cwd: String, ) -> ProcessResult<()>
Replace the userspace image metadata while retaining Linux process identity (PID/PPID/PGID/SID), wait relationships, signal mask, pending signals, and the driver process used to report the eventual exit.
pub fn zombie_timer_count(&self) -> usize
Sourcepub fn next_zombie_reap_deadline(&self) -> Option<Instant>
pub fn next_zombie_reap_deadline(&self) -> Option<Instant>
Earliest cooperative zombie-reap deadline. Runtime adapters compare the exact instant when deciding whether their one process-level timer must be replaced; deriving a fresh duration on every pump would make the same deadline appear to move and cause cancellation churn.
Sourcepub fn reap_due_zombies(&self)
pub fn reap_due_zombies(&self)
Cooperatively reap any zombies whose TTL deadline has elapsed.
The kernel owns deadlines but no scheduler or worker. Runtime adapters call this from their bounded timer/event turn.
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>>
Sourcepub fn take_nonterminal_wait_event_for(
&self,
waiter_pid: u32,
pid: i32,
flags: WaitPidFlags,
) -> ProcessResult<Option<ProcessWaitResult>>
pub fn take_nonterminal_wait_event_for( &self, waiter_pid: u32, pid: i32, flags: WaitPidFlags, ) -> ProcessResult<Option<ProcessWaitResult>>
Consume one waitable stopped/continued transition without observing or reaping terminal state. Sidecar child-process bridges use this while terminal reaping remains coupled to stdout/stderr EOF delivery.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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> ⓘ
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