[gnome-terminal/benzea/systemd-integration: 4/4] build: Bind terminal children to graphical session



commit 1cce54cf6e6db7fb82783862d63233c72cc0a719
Author: Benjamin Berg <bberg redhat com>
Date:   Tue Feb 4 13:37:41 2020 +0100

    build: Bind terminal children to graphical session
    
    This ensures that all processes launched by gnome-terminal (and their
    children) are reaped when the user logs out of the graphical session.
    
    Note that this moves the killing of lingering processes from the point
    where the systemd user instance is shut down to the the point where the
    user is logging out of the graphical session.
    
    A slightly more conservative approach might be to keep setting the
    KillMode. However, as said above, this will just delay the reaping by 10
    seconds. If processes need/want to linger, they will need to deal with
    systemd properly to achieve this. So really, we are "just" increasing
    the pressure on projects to adjust to a systemd managed worled.
    
    Note that this setup does still permit processes to survive a
    gnome-terminal-server crash or stop.

 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 5fe006e8..c585e1c8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -173,9 +173,9 @@ gnome-terminal-server.service: Makefile
 defaults.conf: Makefile
        $(AM_V_GEN) ( echo "[Unit]"; \
                      echo "CollectMode=inactive-or-failed"; \
+                     echo "PartOf=graphical-session.target"; \
                      echo "[Scope]"; \
                      echo "Slice=apps-org.gnome.Terminal.slice"; \
-                     echo "KillMode=process"; \
                      echo "TimeoutStopSec=5s") > $@
 
 terminal-gdbus-generated.c terminal-gdbus-generated.h: org.gnome.Terminal.xml Makefile


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]