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

Function process_exists

packages/server/src/service.rs:576–584  ·  view source on GitHub ↗
(pid: u32)

Source from the content-addressed store, hash-verified

574}
575
576fn process_exists(pid: u32) -> bool {
577 Command::new("kill")
578 .arg("-0")
579 .arg(pid.to_string())
580 .stdout(std::process::Stdio::null())
581 .stderr(std::process::Stdio::null())
582 .status()
583 .is_ok_and(|status| status.success())
584}
585
586fn choose_service_port_for_bind(preferred: u16, bind: IpAddr) -> anyhow::Result<u16> {
587 let port = preferred.max(1024);

Callers 1

wait_for_process_exitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected