pub struct ProcessControl { /* private fields */ }Expand description
Cloneable interrupt control for exactly one ProcessSubscription run.
Keep the handle in the model, rebuilding subscriptions with clones. Tag
process messages with generation to reject delayed
messages after a restart. Use a fresh handle for each new run. Dropping a
descriptor or a handle clone does not close an active run.
Requests never wait for child I/O or model/stdin queue capacity. The owning supervisor sends SIGINT to the immediate child on Unix, without a shell or process-group signal. Linux requires a retained pidfd; if unavailable, delivery fails instead of falling back to a potentially reused PID. Other Unix platforms require the supervisor to remain the child’s sole reaper.
Implementations§
Source§impl ProcessControl
impl ProcessControl
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
Stable identity shared by clones; fresh handles have distinct identities.
Sourcepub fn status(&self) -> ProcessControlStatus
pub fn status(&self) -> ProcessControlStatus
Read one consistent snapshot. A closed handle need not mean output drained.
Sourcepub fn request_interrupt(&self) -> Result<(), ProcessControlError>
pub fn request_interrupt(&self) -> Result<(), ProcessControlError>
Admit one interrupt for the supervisor to deliver.
Admission is not delivery. Read status for the outcome;
even Sent does not imply that a child handler ran or the child exited.