(proc: ManagedProcess)
| 190 | } |
| 191 | |
| 192 | function infoFor(proc: ManagedProcess): ProcessInfo { |
| 193 | return { |
| 194 | name: proc.name, |
| 195 | command: proc.command, |
| 196 | cwd: proc.cwd, |
| 197 | pid: proc.pid, |
| 198 | uptimeMs: Date.now() - proc.startedAt, |
| 199 | exitCode: proc.exitCode, |
| 200 | exitSignal: proc.exitSignal, |
| 201 | stdoutBytes: proc.stdout.length, |
| 202 | stderrBytes: proc.stderr.length, |
| 203 | alive: proc.exitCode === null, |
| 204 | }; |
| 205 | } |
| 206 | |
| 207 | // Cleanup on QodeX exit |
| 208 | process.on('exit', () => { |