MCPcopy Index your code
hub / github.com/codeaashu/claude-code / makeAncestorPidLookup

Function makeAncestorPidLookup

src/utils/ide.ts:61–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59// caching within the closure's lifetime. Callers should scope this to a
60// single detection pass — PIDs recycle and process trees change over time.
61function makeAncestorPidLookup(): () => Promise<Set<number>> {
62 let promise: Promise<Set<number>> | null = null
63 return () => {
64 if (!promise) {
65 promise = getAncestorPidsAsync(process.ppid, 10).then(
66 pids => new Set(pids),
67 )
68 }
69 return promise
70 }
71}
72
73type LockfileJsonContent = {
74 workspaceFolders?: string[]

Callers 1

detectIDEsFunction · 0.85

Calls 1

getAncestorPidsAsyncFunction · 0.85

Tested by

no test coverage detected