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

Function describePsProcess

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

Source from the content-addressed store, hash-verified

102}
103
104async function describePsProcess(pid: number): Promise<ProcessDescription> {
105 const [args, comm] = await Promise.all([
106 query('ps', ['-ww', '-o', 'args=', '-p', String(pid)]),
107 query('ps', ['-o', 'comm=', '-p', String(pid)]),
108 ]);
109 return { name: comm?.trim() || null, commandLine: args?.trim() || null };
110}
111
112/** What the OS says process `pid` is running. Never throws. */
113export async function describeProcess(pid: number): Promise<ProcessDescription> {

Callers 1

describeProcessFunction · 0.85

Calls 2

queryFunction · 0.70
allMethod · 0.65

Tested by

no test coverage detected