Even if the loader process is not prepared, the launchpad-process-pool
sends the result to the amd. If the initialization of the loader process
is delayed, the caller process cannot get the launched process ID.
To ensure consistency of operation of handling the launch request, the caller
has to get the result from the amd.
Change-Id: Idd523c2a1d3743a39d743833adc801ddb02e2f1a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
CheckAndPrepareLoaderContext(loader_context.get());
CPUBoostController::DoBoost(loader_context->GetPid(),
CPUBoostController::Level::Strong, 10000);
+ request->SendResult(loader_context->GetPid());
pending_requests_.push_back(std::move(request));
return LaunchResult::Pending;
}
}
void Request::SendResult(int result) {
+ if (client_socket_->IsClosed())
+ return;
+
client_socket_->Send(static_cast<void*>(&result), sizeof(result));
+ client_socket_->Close();
}
void Request::SetLoaderContext(std::shared_ptr<LoaderContext> context) {