Fix a race between fork(2) and PROC_REAP_KILL subtree
(cherry picked from commit 39794d80ad900915e5c4940e9917ba5cb59a8634)