()
| 4313 | reject(new Error('Timed out waiting for Codex child process to exit')); |
| 4314 | }, timeoutMs); |
| 4315 | const onExit = () => { |
| 4316 | cleanup(); |
| 4317 | resolve(); |
| 4318 | }; |
| 4319 | const cleanup = () => { |
| 4320 | clearTimeout(timer); |
| 4321 | child.off('exit', onExit); |