Skip to main content

ProcessSupervisor

Trait ProcessSupervisor 

Source
pub trait ProcessSupervisor:
    Debug
    + Send
    + Sync {
    // Required methods
    fn spawn(
        &self,
        attempt: &RunnerAttempt,
        config: &EncodedJitConfig,
    ) -> Result<u32, ProcessStartFailure>;
    fn is_alive(&self, attempt: &RunnerAttempt) -> Result<bool, FailureReason>;
    fn recovered_pid(
        &self,
        attempt: &RunnerAttempt,
    ) -> Result<Option<u32>, FailureReason>;
    fn completed_successfully(&self, attempt: &RunnerAttempt) -> bool;
    fn record_terminate_intent(
        &self,
        attempt: &RunnerAttempt,
    ) -> Result<(), FailureReason>;
    fn has_terminate_intent(&self, attempt: &RunnerAttempt) -> bool;
    fn terminate(&self, attempt: &RunnerAttempt) -> Result<(), FailureReason>;
}

Required Methods§

Source

fn spawn( &self, attempt: &RunnerAttempt, config: &EncodedJitConfig, ) -> Result<u32, ProcessStartFailure>

Source

fn is_alive(&self, attempt: &RunnerAttempt) -> Result<bool, FailureReason>

Source

fn recovered_pid( &self, attempt: &RunnerAttempt, ) -> Result<Option<u32>, FailureReason>

Durable identity observed for a process that spawned before the starting journal write survived.

Source

fn completed_successfully(&self, attempt: &RunnerAttempt) -> bool

True only for a child this invocation owned and reaped with a successful exit status. A recovered process that is merely gone answers false.

Source

fn record_terminate_intent( &self, attempt: &RunnerAttempt, ) -> Result<(), FailureReason>

Source

fn has_terminate_intent(&self, attempt: &RunnerAttempt) -> bool

Source

fn terminate(&self, attempt: &RunnerAttempt) -> Result<(), FailureReason>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§