refactor: route zsh-fork through unified exec

This commit is contained in:
Michael Bolin
2026-03-05 16:13:42 -08:00
parent 4fa3a6b116
commit 5b1b74e3ab
8 changed files with 846 additions and 70 deletions

View File

@@ -1,6 +1,7 @@
use anyhow::Context;
use std::fs;
use std::path::Path;
use std::process::Stdio;
use std::time::Duration;
pub async fn wait_for_pid_file(path: &Path) -> anyhow::Result<String> {
@@ -24,6 +25,7 @@ pub async fn wait_for_pid_file(path: &Path) -> anyhow::Result<String> {
pub fn process_is_alive(pid: &str) -> anyhow::Result<bool> {
let status = std::process::Command::new("kill")
.args(["-0", pid])
.stderr(Stdio::null())
.status()
.context("failed to probe process liveness with kill -0")?;
Ok(status.success())