Comment 22 for bug 2011806

Revision history for this message
Marco Trevisan (TreviƱo) (3v1n0) wrote :

The workaround that is coming in gnome-shell is enough to handle the normal snap cases, however that's not to be considered a proper solution.

The usage of `ChildSetupFunc` is not easily doable without some refactor in the shell that I'm not keen to do for something that is not likely going to be upstreamable, because the child PID isn't known at JS level at that point so we can't just use it without implementing something else in C ("it is not safe to call any function which may call malloc()" from there, so we can't control what gjs is going to do).

Even doing it, this wouldn't fix the majority of other cases where the cgroup move happens when using the launch context (i.e. when apps are launched from dock or activities).

So, I feel snapd tracker should somewhat be able to track that an app changed its cgroup and move it back to what it belongs, but as discussed in https://github.com/systemd/systemd/issues/26925 there's nothing telling us that right now.