(printOutput: string)
| 313 | }; |
| 314 | |
| 315 | const 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 | |
| 322 | const makeLaunchdBackend = (): ServiceBackend => { |
| 323 | const serviceTarget = (uid: number): string => `gui/${uid}/${SERVICE_LABEL}`; |
no outgoing calls
no test coverage detected