MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / terminate_process_group

Function terminate_process_group

packages/server/src/service.rs:540–549  ·  view source on GitHub ↗
(pid: u32, timeout: Duration)

Source from the content-addressed store, hash-verified

538}
539
540fn terminate_process_group(pid: u32, timeout: Duration) {
541 signal_process_group(pid, "TERM");
542 signal_process(pid, "TERM");
543 if wait_for_process_exit(pid, timeout) {
544 return;
545 }
546 signal_process_group(pid, "KILL");
547 signal_process(pid, "KILL");
548 let _ = wait_for_process_exit(pid, SERVICE_KILL_GRACE);
549}
550
551fn signal_process(pid: u32, signal: &str) {
552 let _ = Command::new("kill")

Callers 1

unload_existing_servicesFunction · 0.70

Calls 3

signal_process_groupFunction · 0.70
signal_processFunction · 0.70
wait_for_process_exitFunction · 0.70

Tested by

no test coverage detected