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

Function parseLaunchctlPid

apps/cli/src/service.ts:319–324  ·  view source on GitHub ↗
(printOutput: string)

Source from the content-addressed store, hash-verified

317};
318
319const parseLaunchctlPid = (printOutput: string): number | null => {
320 const match = printOutput.match(/\bpid\s*=\s*(\d+)/);
321 if (!match) return null;
322 const pid = Number.parseInt(match[1], 10);
323 return Number.isInteger(pid) && pid > 0 ? pid : null;
324};
325
326const makeLaunchdBackend = (): ServiceBackend => {
327 const serviceTarget = (uid: number): string => `gui/${uid}/${SERVICE_LABEL}`;

Callers 1

makeLaunchdBackendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected