From cf7b355134bc7e0b5128ecf765740ec2ccb19b82 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Thu, 20 Jul 2023 22:52:52 -0400 Subject: [PATCH] `main.cpp`: Improvements --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index a123c2c..6d4e3d6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -66,7 +66,13 @@ int main(int argc, char *argv[]) QFile::remove("/tmp/rescan_userapps"); log("Re-scanning user applications from explicit request", "main"); writeFile("/opt/ibxd", "gui_apps_stop\n"); - QThread::msleep(1000); + while(true) { + if(QFile::exists("/tmp/gui_apps_stopped")) { + log("there"); + QFile::remove("/tmp/gui_apps_stopped"); + break; + } + } writeFile("/opt/ibxd", "gui_apps_start\n"); while(true) { if(QFile::exists("/tmp/gui_apps_started")) {