sub reapchild { while (waitpid(-1, &WNOHANG) > 0) { pop @pids; } }