Sublime Text & Merge can't be registered as systemd scope/cgroup on Linux
Description of the bug
Recently (not exactly sure when, but one of the latest dev builds) Sublime Text & Sublime Merge lost ability to be registered as a systemd/cgroup scope on start. This leads to HQ apps being bound to the shell/launcher that started the process, in my case it's KDE/Plasma. As a developer working on KDE software I often need to restart KWin and Plasma shell, so you can imagine how inconvenient it is to have my primary dev apps die every time I kill Plasma to test stuff.
In Plasma console a message appears:
kf.kio.gui: Failed to register new cgroup: "app-sublime_merge-4209712a89fc4745a6d99409acf49c82.scope" "org.freedesktop.DBus.Error.UnixProcessIdUnknown" "Process with ID 10710 does not exist."
which leads me to think it's somehow related to the way Sublime HQ apps handle multi-instance and forking.
Steps to reproduce
- Start Sublime Text from Plasma panel: Task Manager, Application Launcher (Kickoff) or any other way.
killall plasmashell; plasmashell &
Expected behavior
Plasma shell restarts, but all the apps are left intact.
Actual behavior
Sublime Text & Merge die together with Plasma.
Sublime Text build number
Text 4134, Merge 2027
Operating system & version
Linux X11
(Linux) Desktop environment and/or window manager
KDE/Plasma (master)
Additional information
Relevant code in Plasma can be found in the kio framework somewhere here: https://invent.kde.org/frameworks/kio/-/merge_requests/920
OpenGL context information
No response
Nothing regarding the process handling has changed since ST3. Are you sure it worked previously?
I'm pretty sure Sublime is doing something off, because it's not the first time we have issues between them and task management. Earlier they lost icons because of some naming convention like upper/lower letters in desktop files — I don't clearly remember anymore. But the thing is, this didn't happen before.
Nothing regarding the process handling has changed since ST3
speaking of which, Sublime Merge always starts with its window focused but not raised. I had to click its icon two more times in a panel to finally bring it to front. But that's a different issue.
I'm pretty sure Sublime is doing something off,
No, this is a KDE issue. We fork+exec then take the PID of that and try and do things with it. (gnome does the same for now) If sublime in turn double forks+exec then quits super duper fast that KDE step will fail.
We have options of fixes, but that's out of scope for here, it's not a sublime issue.
Out of curiosity: can apps wait for their cgroup to change, maybe with a sane timeout of half a second or so?
This isn't a ST issue so I'm going to close it.