diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2024-09-22 14:47:39 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2024-09-22 14:59:26 +0300 |
commit | cc6f1bd569ef972ae648bff093cef96f145269c6 (patch) | |
tree | 494b96010c0b39bd54d31f5b56a96b7ee3697a14 | |
parent | b5af02e63c409d2968a6e5dae92eca050c86242e (diff) | |
download | tdebase-cc6f1bd569ef972ae648bff093cef96f145269c6.tar.gz tdebase-cc6f1bd569ef972ae648bff093cef96f145269c6.zip |
TDESynDaemon: prevent more than one instance from running at the same time
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-rw-r--r-- | kcontrol/input/tdesyndaemon.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kcontrol/input/tdesyndaemon.cpp b/kcontrol/input/tdesyndaemon.cpp index 92855e40a..2be3e992c 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(); |