Description
After child.kill('SIGTERM'), an unref'd setTimeout(... 1000) schedules child.kill('SIGKILL'). If the child exited cleanly within 1s, the timer still fires and calls kill on a dead process (the !child.killed guard doesn't reliably catch it).
Environment
- OS: Any
- Node version: v22.20.0
- Nanocoder version: 1.30.0
- Provider: N/A
- Model: N/A
Steps to Reproduce
- Run a custom tool that terminates immediately upon receiving SIGTERM.
- Wait 1 second and monitor process logs.
Expected Behavior
The SIGKILL timer should be cleared when the process exits.
Actual Behavior
The timer fires, attempting to kill a dead process, potentially causing an unhandled error or noisy warning.
Additional Context
Description
After
child.kill('SIGTERM'), an unref'dsetTimeout(... 1000)scheduleschild.kill('SIGKILL'). If the child exited cleanly within 1s, the timer still fires and calls kill on a dead process (the!child.killedguard doesn't reliably catch it).Environment
Steps to Reproduce
Expected Behavior
The SIGKILL timer should be cleared when the process exits.
Actual Behavior
The timer fires, attempting to kill a dead process, potentially causing an unhandled error or noisy warning.
Additional Context