[WRTjs][Service] Reset IPC more safely when wrt-service terminate 61/295161/3
authorChunling Ye <chunling.ye@samsung.com>
Mon, 3 Jul 2023 09:00:50 +0000 (17:00 +0800)
committerBot Blink <blinkbot@samsung.com>
Wed, 5 Jul 2023 08:53:16 +0000 (08:53 +0000)
 Reset IPC after all service apps exit.

Change-Id: I68f97bf4dd9a0d08fc7be54841630023b659df9e
Signed-off-by: Chunling Ye <chunling.ye@samsung.com>
wrt/src/app/service_main.cc

index 7e05a02b9811c250c6e8af558a62b1b14defa19a..b485579d2cd64b2a6d3f4cb6e62c336837762709 100644 (file)
@@ -75,7 +75,6 @@ void ChildCreated() {
 
 void ChildTerminated(int sig_no) {
   LOG(INFO) << "sig_no : " << sig_no;
-  wrt_ipc.reset();
   child_created = false;
 
   uid_t uid = getuid();
@@ -88,6 +87,7 @@ void ChildTerminated(int sig_no) {
         LOG(ERROR) << "aul_kill_pid() has failed";
     }
   }
+  wrt_ipc.reset();
   started_apps.clear();
 }