We've all known someone or been that someone that at some point in time shut down their machine while their distro's package manager was in the middle of rebuilding initrd, unpacking a kernel, or some other critical task that, if interrupted, would leave the system in a broken state. It would be great if when logging out / shutting down the machine via xfce4-session's GUI, it checked to see if the distro's package manager was running (e.g. dpkg, yum, etc.). If it was running, the user could be warned and given the opportunity to wait or cancel ending their xfce session.
Both apt [1] and dnf [2] use systemd inhibitors to prevent a shutdown or reboot. This is not needed for a logout, because the package installation is not a user process and it will continue until finished. Ideally, every package manager should handle this in some way. --- [1] https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1820886 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1109927