D14302: Don't block forever in ensureKdeinitRunning

Thiago Macieira noreply at phabricator.kde.org
Tue Jul 24 19:56:54 BST 2018


thiago added inline comments.

INLINE COMMENTS

> kdeinitinterface.cpp:46
>      QLockFile lock(QDir::tempPath() + QLatin1Char('/') + QLatin1String("startkdeinitlock"));
> -    if (!lock.tryLock()) {
> +    if (!lock.tryLock(timeout)) {
>          lock.lock();

This line doesn't need changing. You're getting a tryLock() failure because the lock file already exists. Adding a 5 second timeout is not going to change that.

> kdeinitinterface.cpp:47
> +    if (!lock.tryLock(timeout)) {
>          lock.lock();
>          if (dbusDaemon->isServiceRegistered(QStringLiteral("org.kde.klauncher5"))) {

The problem is here. So we failed to lock, then we try again to lock, forever. Why is this code doing that?

REPOSITORY
  R271 KDBusAddons

REVISION DETAIL
  https://phabricator.kde.org/D14302

To: jtamate, dfaure, #frameworks, thiago
Cc: lvsouza, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180724/369efb53/attachment.html>


More information about the Kde-frameworks-devel mailing list