MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / writeHostPpidLauncher

Function writeHostPpidLauncher

__tests__/npm-shim.test.ts:62–67  ·  view source on GitHub ↗
(binDir: string)

Source from the content-addressed store, hash-verified

60// A fake bundle launcher that echoes the threaded host pid, so we can prove the
61// shim passed CODEGRAPH_HOST_PPID down to the server (#1185).
62function writeHostPpidLauncher(binDir: string): void {
63 fs.mkdirSync(binDir, { recursive: true });
64 const p = path.join(binDir, 'codegraph');
65 fs.writeFileSync(p, '#!/bin/sh\necho "HOST_PPID=[${CODEGRAPH_HOST_PPID}]"\n');
66 fs.chmodSync(p, 0o755);
67}
68
69// Launch the shim with async spawn so the in-process HTTPS server can respond
70// while it runs (spawnSync would block this event loop and deadlock).

Callers 1

npm-shim.test.tsFile · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected