If SIGCHLD signal is received, launchpad checks whether the pending request
exists or not. If it exists, launchpad sends the launch signal to listeners.
Change-Id: Ie82b4df2b49ce02beb95a4b7547584b6a674d424
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
return;
}
- _D("[DBUS] %s", args->GetLogMessage().c_str());
+ _W("[DBUS] %s", args->GetLogMessage().c_str());
}
void WorkerThread() {
pid_map_.erase(found);
}
+ auto iter = pending_requests_.begin();
+ while (iter != pending_requests_.end()) {
+ auto request = *iter;
+ auto context = request->GetAvailableLoaderContext();
+ if (context != nullptr && context->GetPid() == pid) {
+ context->Unref();
+ auto* app_info = request->GetAppInfo();
+ launchpad::DBus::SendAppLaunchSignal(context->GetPid(),
+ app_info->GetAppId().c_str());
+ pending_requests_.erase(iter);
+ break;
+ }
+
+ iter++;
+ }
+
launchpad::Log::Print("[SIGCHLD]", "pid(%7d)", pid);
LoaderManager::GetInst().HandleSigchld(pid);
}