pub fn terminate_tree(
pid: u32,
config: TerminateTreeConfig,
) -> SysprimsResult<TerminateTreeResult>Expand description
Terminate a process by PID with escalation.
This compatibility API has no owned child or sealed containment receipt, so
it signals only the supplied PID and always reports best_effort. Use an
owned ContainmentGuard for process-group or Job Object termination.
ยงExamples
use sysprims_timeout::{terminate_tree, TerminateTreeConfig};
// Replaces: kill -TERM 1234; sleep 2; kill -KILL 1234
let result = terminate_tree(1234, TerminateTreeConfig::default()).unwrap();
println!("exited={} timed_out={}", result.exited, result.timed_out);