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

Function parseLaunchctlPid

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

Source from the content-addressed store, hash-verified

324};
325
326const parseLaunchctlPid = (printOutput: string): number | null => {
327 const match = printOutput.match(/\bpid\s*=\s*(\d+)/);
328 if (!match) return null;
329 const pid = Number.parseInt(match[1], 10);
330 return Number.isInteger(pid) && pid > 0 ? pid : null;
331};
332
333const makeLaunchdBackend = (): ServiceBackend => {
334 const serviceTarget = (uid: number): string => `gui/${uid}/${SERVICE_LABEL}`;

Callers 1

makeLaunchdBackendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected