public function forkAndRunService($bootstrap)
    {
        if (!is_callable($bootstrap)) {
            throw new \RuntimeException('$bootstrap must be callable.');
        }

        if ($this->service !== null) {
            // We already have a service.
            throw new \RuntimeException('Service already started.');
        }

        $serviceAddress = $this->getServiceAddress();
        $factory = $this->getSocketFactory();
        $logger = $this->getLogger();
        try {
            $this->service = PidTracker::fork(function() use ($bootstrap, $serviceAddress, $factory, $logger) {
                $socket = $factory->createReply(Factory::MODE_CONNECT, $serviceAddress);
                $service = new Service($socket);
                $service->setLogger($logger);
                call_user_func($bootstrap, $service);
                $service->run();
            });
            $this->getLogger()->info('Service (PID: '.$this->service->getPid().') started.');
        } catch (\RuntimeException $ex) {
            $this->getLogger()->error($ex->getMessage());
            throw $ex;
        }

        return $this;
    }