(output: string)
| 21 | * Returns the PID or null if invalid. |
| 22 | */ |
| 23 | export function parsePid(output: string): number | null { |
| 24 | const pid = parseInt(output.trim(), 10); |
| 25 | return isNaN(pid) || pid <= 0 ? null : pid; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Shared command builders for background process management. |
no outgoing calls
no test coverage detected