public function reapZombies() {
        $reaped = 0;
        // Clean up any exited children
        do {
            $status = null;
            $pid = pcntl_wait($status, WNOHANG);
            if ($pid > 0) {
                $this->reapChild($pid, $status);
                $reaped++;
            }
        } while ($pid > 0);
        return $reaped;
    }