TDESynDaemon: prevent more than one instance from running at the same time

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/539/head
Mavridis Philippe 2 months ago
parent b5af02e63c
commit cc6f1bd569
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -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();

Loading…
Cancel
Save