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

Function parseLaunchctlPid

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

Source from the content-addressed store, hash-verified

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

Callers 1

makeLaunchdBackendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected