summaryrefslogtreecommitdiffstats
path: root/kcontrol/input/tdesyndaemon.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2024-09-22 14:47:39 +0300
committerMavridis Philippe <[email protected]>2024-09-22 15:14:25 +0300
commit82ec9916fb4c9bee801e22b36e2fc86fd64ab6c4 (patch)
treea39c4b88a6874a951101ee1395d159101c4b5d3a /kcontrol/input/tdesyndaemon.cpp
parenteac0d87067752a4fb30e31ac9db710023dd7e653 (diff)
downloadtdebase-82ec9916fb4c9bee801e22b36e2fc86fd64ab6c4.tar.gz
tdebase-82ec9916fb4c9bee801e22b36e2fc86fd64ab6c4.zip
TDESynDaemon: prevent more than one instance from running at the same time
Signed-off-by: Mavridis Philippe <[email protected]> (cherry picked from commit cc6f1bd569ef972ae648bff093cef96f145269c6)
Diffstat (limited to 'kcontrol/input/tdesyndaemon.cpp')
-rw-r--r--kcontrol/input/tdesyndaemon.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/kcontrol/input/tdesyndaemon.cpp b/kcontrol/input/tdesyndaemon.cpp
index 46b6d1c92..a9dfebc01 100644
--- a/kcontrol/input/tdesyndaemon.cpp
+++ b/kcontrol/input/tdesyndaemon.cpp
@@ -194,7 +194,13 @@ extern "C" TDE_EXPORT int main(int argc, char *argv[])
TDEApplication app;
app.disableSessionManagement();
+ if (app.dcopClient()->isApplicationRegistered("tdesyndaemon"))
+ {
+ kdWarning() << "TDESynDaemon already running, exiting..." << endl;
+ return 255;
+ }
app.dcopClient()->registerAs("tdesyndaemon", false);
+ app.dcopClient()->setDefaultObject("tdesyndaemon");
TDESynDaemon tdesyndaemon;
return app.exec();