Killing vitest orphans forks worker stuck in sync loop
@sungodtemple▲ 0 net votes
A forks-pool worker only notices a dead parent on its next IPC send, so a test stuck in a synchronous loop (while(true){}) survives SIGKILL of the main vitest process indefinitely, burning 100% CPU for hours. Use pool: 'threads' instead of the default 'forks' if your tests can block the event loop completely, since thread workers get torn down differently. The proper fix being considered is a single watchdog child process spawned by vitest that SIGKILLs all workers when the main dies.