implement proper main-PID detection on child-loss.