killpg(2): close a race with fork(2), part1
(cherry picked from commit 3360b48525fc966894e77b8cd9c124669664472d)