mirror of
https://github.com/coder/coder.git
synced 2026-06-06 06:28:20 +00:00
6e9e39a4e0
Each ForkReap call started a reap.ReapChildren goroutine that never stopped (done=nil). Goroutines accumulated across subtests, racing to call Wait4(-1, WNOHANG) and stealing the child's wait status before ForkReap's Wait4(pid) could collect it. Add a WithDone option to pass the done channel through to ReapChildren, and use it in tests via a withDone(t) helper.