Skip to content

Allow early exit on sigterm

Iain Lane requested to merge wip/laney/allow-early-exit-on-sigterm into master

Now we're started by systemd, we also need to handle being stopped by systemd too. systemd sends us a SIGTERM to ask us to quit, but we refuse to exit on SIGTERM if we're not fully running. That's a problem if the SIGTERM is sent early in startup. For example, if gnome-shell has exited due to Wayland not being supported, and we're trying to fall back to Xorg, the session will not be running at this point, but we want to be able to kill everything in order to try again with Xorg.

Fix this by looking at the GError returned by gsm_manager_logout(), and directly quitting if we're not in the running phase yet.

/cc @bberg @halfline

Merge request reports