} else {
m_syncPipe.claimChildEp();
- RUNNER_ASSERT_ERRNO_MSG(setLauncherSecurityAttributes(app.getUID(), app.getGID()) == 0,
- "launcher failed");
- Api::prepareAppCandidate();
- Api::prepareApp(app.getAppId().c_str());
-
+ try {
+ RUNNER_ASSERT_ERRNO_MSG(setLauncherSecurityAttributes(app.getUID(), app.getGID()) == 0,
+ "launcher failed");
+ Api::prepareAppCandidate();
+ Api::prepareApp(app.getAppId().c_str());
+ } catch (...) {
+ m_syncPipe.post();
+ throw;
+ }
m_syncPipe.post();
m_syncPipe.wait();
exit(0);