MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / spawn_mdns_command

Function spawn_mdns_command

crates/opencode-cli/src/main.rs:1979–1995  ·  view source on GitHub ↗
(command: &str, args: &[String])

Source from the content-addressed store, hash-verified

1977}
1978
1979fn spawn_mdns_command(command: &str, args: &[String]) -> io::Result<MdnsPublisher> {
1980 let mut child = ProcessCommand::new(command)
1981 .args(args)
1982 .stdin(Stdio::null())
1983 .stdout(Stdio::null())
1984 .stderr(Stdio::null())
1985 .spawn()?;
1986
1987 if let Ok(Some(status)) = child.try_wait() {
1988 return Err(io::Error::new(
1989 io::ErrorKind::Other,
1990 format!("mDNS publisher exited immediately with status {}", status),
1991 ));
1992 }
1993
1994 Ok(MdnsPublisher { child })
1995}
1996
1997fn start_mdns_publisher_if_needed(
1998 enabled: bool,

Callers 1

Calls 2

newFunction · 0.85
spawnMethod · 0.80

Tested by

no test coverage detected