pub struct WorkerProcess {
pub child: Child,
_guard: JobObject,
_drains: Vec<JoinHandle<()>>,
}Expand description
A spawned worker process: the child, its kill-guard, and the two pipe-drain threads. Drop order (struct fields drop top-to-bottom) closes the guard last, but the kill mechanism (KILL_ON_JOB_CLOSE or SIGKILL to process group) plus the child’s own exit make teardown robust.
Fields§
§child: Child§_guard: JobObject§_drains: Vec<JoinHandle<()>>Implementations§
Source§impl WorkerProcess
impl WorkerProcess
Sourcepub fn spawn(
program: &Path,
args: &[String],
max_heap: Option<&str>,
) -> Result<Self>
pub fn spawn( program: &Path, args: &[String], max_heap: Option<&str>, ) -> Result<Self>
Spawn program args…, assign to a fresh kill-guard (Job Object on Windows, process group
on Unix), and drain stdout+stderr to host stderr.
max_heap (e.g. “2G”) is forwarded to Ghidra via the MAXMEM env var if set.
Auto Trait Implementations§
impl !RefUnwindSafe for WorkerProcess
impl !UnwindSafe for WorkerProcess
impl Freeze for WorkerProcess
impl Send for WorkerProcess
impl Sync for WorkerProcess
impl Unpin for WorkerProcess
impl UnsafeUnpin for WorkerProcess
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