Reap the direct child before macOS process-group escalation
On macOS, an owned process group containing only an unreaped zombie direct child can make a later group kill return a permission error even though no live process remains. After the termination grace period, poll or wait on that direct child before escalating to the original grou…