Blob Blame History Raw
per https://bugzilla.redhat.com/show_bug.cgi?id=796969#c23
The process that executes kdm/backend/session.c:manageSession() is the leader
process of the logind session.

manageSession() calls:

    blockTerm();
    clientExited();
    unblockTerm();

where clientExited() ends the PAM session.
With the current systemd-logind, ending the PAM session will cause the leader
process to be delivered SIGHUP and SIGTERM. The process will die and the
remainder of manageSession() will not be executed.

Interestingly, at the end of the function there's a call to sessionExit(),
which calls clientExited() again.

Removing the three lines quoted above makes reboot from KDE work again. I
haven't noticed any bad effects.

diff -up kde-workspace-4.8.0/kdm/backend/session.c.bz796969 kde-workspace-4.8.0/kdm/backend/session.c
--- kde-workspace-4.8.0/kdm/backend/session.c.bz796969	2012-01-18 14:08:40.000000000 -0600
+++ kde-workspace-4.8.0/kdm/backend/session.c	2012-02-28 07:17:16.270219932 -0600
@@ -662,9 +662,9 @@ manageSession(void)
         sessionExit(EX_AL_RESERVER_DPY);
     }
 
-    blockTerm();
-    clientExited();
-    unblockTerm();
+    /* blockTerm(); */
+    /* clientExited(); */
+    /* unblockTerm(); */
 
     gSet(&mstrtalk);
     gSendInt(D_UnUser);