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

Function describeProcess

src/mcp/process-identity.ts:113–118  ·  view source on GitHub ↗
(pid: number)

Source from the content-addressed store, hash-verified

111
112/** What the OS says process `pid` is running. Never throws. */
113export async function describeProcess(pid: number): Promise<ProcessDescription> {
114 if (!Number.isSafeInteger(pid) || pid <= 0) return { name: null, commandLine: null };
115 if (process.platform === 'win32') return describeWindowsProcess(pid);
116 if (process.platform === 'linux') return describeLinuxProcess(pid);
117 return describePsProcess(pid);
118}
119
120/**
121 * Whether a command line is a CodeGraph MCP server's, the only kind of process

Callers 3

holderIsForeignFunction · 0.90
daemonStopFailureMessageFunction · 0.90

Calls 3

describeWindowsProcessFunction · 0.85
describeLinuxProcessFunction · 0.85
describePsProcessFunction · 0.85

Tested by

no test coverage detected