MCPcopy
hub / github.com/garrytan/gstack / defaultProcessRunning

Function defaultProcessRunning

lib/gbrain-guards.ts:144–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142}
143
144function defaultProcessRunning(): boolean {
145 // No reliable pgrep on Windows; rely on the lock-file signal there.
146 if (process.platform === "win32") return false;
147 const r = spawnSync("pgrep", ["-f", "gbrain autopilot"], { encoding: "utf-8", timeout: 3_000 });
148 return r.status === 0 && (r.stdout || "").trim().length > 0;
149}
150
151// ── Capability detection (E4 + Codex: per-process memo, no persistent cache) ─
152//

Callers

nothing calls this directly

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected