Skip to content

gdesktopappinfo: Move launched applications into transient scope

msizanoen1 requested to merge msizanoen1/glib:asdf into main

This is a revival and cleanup of !1596 (closed).

Original commit message:

Try to move the spawned executable into its own systemd scope. To avoid possible race conditions and ensure proper accounting, we delay the execution of the real command until after the DBus call to systemd has finished.

From the two approaches we can take here, this is better in the sense that we have a child that the API consumer can watch. API consumers should not be doing this, however, gnome-session needs to watch children during session startup. Until gnome-session is fixed, we will not be able to change this.

The alternative approach is to delegate launching itself to systemd by creating a transient .service unit instead. This is cleaner and has e.g. the advantage that systemd will take care of log redirection and similar issues.

Edited by msizanoen1

Merge request reports