In case any of ScopedAppLauncher child process asserts fails, make sure the
parent is notified and displays the error properly.
Change-Id: I75bbe0e7781cf338b62a39de03fda8f305ae8d50
} 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);