• Iain Lane's avatar
    binary: Allow quitting early on SIGTERM/SIGINT · 04d1eb2d
    Iain Lane authored
    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.
    04d1eb2d
main.c 20.9 KB