Send a finished signal after all operation is completed 75/245875/4
authorIlho Kim <ilho159.kim@samsung.com>
Mon, 19 Oct 2020 02:30:15 +0000 (11:30 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Wed, 21 Oct 2020 06:13:35 +0000 (15:13 +0900)
Since the clean type recovery has been added
If the process of all steps is successful,
the installer considers all of the installation to be successful
and sends a finished signal
If there is an operation in a clean that has not yet been completed
like database commit operation, there is a timing issue that an application
that received the finished signal can access where it is not completed

Change-Id: I3195b46ded497cc67bfc2d12e528d9a9e7961cea
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/common/installer/app_installer.cc

index 43f6b3c..9cd1e4e 100644 (file)
@@ -305,7 +305,6 @@ AppInstaller::Result AppInstaller::Clean() {
     recovery_file->set_cleanup(true);
     recovery_file->WriteAndCommitFileContent();
   }
-  SendFinished(status_);
 
   do {
     if (it_ == steps_.end())
@@ -317,6 +316,7 @@ AppInstaller::Result AppInstaller::Clean() {
     }
   } while (it_-- != steps_.begin());
   sync();
+  SendFinished(status_);
 
   LogHistoryEnd(true);