D27471: [plasma-session] Avoid potential race condition starting a service
davidedmundson added inline comments. INLINE COMMENTS > broulik wrote in startup.cpp:429 > Could probably use an `m_service.isEmpty()` check since it will still > needlessly do a `NameHasOwner` call All usages of this class (which is just the 1 case to start ksmserver!) have a name passed. Without a name it wouldn't ever finish. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D27471 To: davidedmundson, #plasma, apol Cc: broulik, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27471: [plasma-session] Avoid potential race condition starting a service
broulik added inline comments. INLINE COMMENTS > startup.cpp:429 > { > +if > (QDBusConnection::sessionBus().interface()->isServiceRegistered(m_serviceId)) > { > +qCDebug(PLASMA_SESSION) << m_process << "already running"; Could probably use an `m_service.isEmpty()` check since it will still needlessly do a `NameHasOwner` call REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D27471 To: davidedmundson, #plasma, apol Cc: broulik, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27471: [plasma-session] Avoid potential race condition starting a service
This revision was automatically updated to reflect the committed changes. Closed by commit R120:854b64fc130b: [plasma-session] Avoid hypothetical race condition starting a service (authored by davidedmundson). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D27471?vs=75902&id=75907#toc REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D27471?vs=75902&id=75907 REVISION DETAIL https://phabricator.kde.org/D27471 AFFECTED FILES startkde/plasma-session/startup.cpp startkde/plasma-session/startup.h To: davidedmundson, #plasma, apol Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27471: [plasma-session] Avoid potential race condition starting a service
davidedmundson created this revision. davidedmundson added a reviewer: Plasma. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. davidedmundson requested review of this revision. REVISION SUMMARY If for some reason a service is started before StartServiceJob runs, we will end up blocking forever. TEST PLAN Logged in REPOSITORY R120 Plasma Workspace BRANCH master REVISION DETAIL https://phabricator.kde.org/D27471 AFFECTED FILES startkde/plasma-session/startup.cpp startkde/plasma-session/startup.h To: davidedmundson, #plasma Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27471: [plasma-session] Avoid potential race condition starting a service
davidedmundson added a comment. I think for 5.18 REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D27471 To: davidedmundson, #plasma Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart