{{ message }}
Repository navigation
Commit 146f00f
child_process: clear timeout timer on spawn-time error too
When spawn() fails at the OS level (ENOENT, EACCES, EAGAIN, EMFILE,
ENFILE), the resulting ChildProcess only ever emits 'error', never
'exit'. The `timeout` option's cleanup only listened for 'exit', so
the timer stayed armed for the full `timeout` duration on any
spawn-time failure, holding the event loop open well after the
promise/callback had already settled via 'error'.
Clear the timer on 'error' as well as 'exit'.
Fixes: #65504
Signed-off-by: kishore280 <maheshwarankishore@gmail.com>
PR-URL: #65506
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>1 parent a27db42 commit 146f00f
2 files changed
Lines changed: 21 additions & 1 deletion

0 commit comments