MCPcopy Create free account
hub / github.com/aeroxy/chrome-devtools-cli / spawn_daemon

Function spawn_daemon

src/client.rs:45–58  ·  view source on GitHub ↗

Spawn the daemon process in the background.

(ws_url: &str)

Source from the content-addressed store, hash-verified

43
44/// Spawn the daemon process in the background.
45pub fn spawn_daemon(ws_url: &str) -> Result<()> {
46 let exe = std::env::current_exe()?;
47 let mut cmd = std::process::Command::new(&exe);
48 cmd.args(["__daemon__", ws_url])
49 .stdin(std::process::Stdio::null())
50 .stdout(std::process::Stdio::null())
51 .stderr(std::process::Stdio::null());
52
53 #[cfg(windows)]
54 cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
55
56 cmd.spawn()?;
57 Ok(())
58}
59
60/// Wait for the daemon socket to become available, with exponential backoff.
61pub async fn wait_for_daemon() -> Result<()> {

Callers 1

runFunction · 0.85

Calls 1

spawnMethod · 0.80

Tested by

no test coverage detected