MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / stopDaemon

Function stopDaemon

packages/hosts/mcp/src/stdio-integration.test.ts:57–67  ·  view source on GitHub ↗
(dataDir: string)

Source from the content-addressed store, hash-verified

55
56/** Stop the daemon started above; the manifest carries its pid. */
57const stopDaemon = (dataDir: string): Effect.Effect<void> =>
58 Effect.sync(() => manifestPid(dataDir)).pipe(
59 Effect.flatMap((pid) =>
60 pid
61 ? Effect.try({ try: () => process.kill(pid, "SIGTERM"), catch: () => undefined }).pipe(
62 Effect.ignore,
63 )
64 : Effect.void,
65 ),
66 Effect.ignore,
67 );
68
69const withDaemon = Effect.acquireRelease(
70 Effect.sync(() => {

Callers 1

Calls 3

manifestPidFunction · 0.85
killMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected