[plasma-session] Avoid potential race condition starting a service
ClosedPublic

Authored by davidedmundson on Feb 18 2020, 10:06 AM.

Details

Summary

If for some reason a service is started before StartServiceJob runs, we
will end up blocking forever.

Test Plan

Logged in

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 18 2020, 10:06 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Feb 18 2020, 10:06 AM
apol accepted this revision.Feb 18 2020, 12:08 PM
This revision is now accepted and ready to land.Feb 18 2020, 12:08 PM
This revision was automatically updated to reflect the committed changes.
broulik added inline comments.
startkde/plasma-session/startup.cpp
429

Could probably use an m_service.isEmpty() check since it will still needlessly do a NameHasOwner call

startkde/plasma-session/startup.cpp
429

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.