[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kdm/backend
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2005-01-09 7:40:25
Message-ID: 20050109074025.407831B1EF () office ! kde ! org
[Download RAW message or body]

CVS commit by ossi: 

call the startup script from the just forked session, not from the
display subdaemon - to make sessreg see the right parent.


  M +10 -17    client.c   2.79


--- kdebase/kdm/backend/client.c  #2.78:2.79
@@ -1077,5 +1077,4 @@ mergeSessionArgs (int cansave)
 
 static int removeAuth;
-static int sourceReset;
 
 int
@@ -1220,13 +1219,4 @@ StartClient ()
     }
 
-    /*
-     * Run system-wide initialization file
-     */
-    sourceReset = 1;
-    if (source (systemEnviron, td->startup, td_setup) != 0) {
-        LogError ("Cannot execute startup script %\"s\n", td->startup);
-        SessionExit (EX_NORMAL);
-    }
-
     if (*dmrcDir)
         mergeSessionArgs (TRUE);
@@ -1251,4 +1241,10 @@ StartClient ()
     switch (pid = Fork ()) {
     case 0:
+
+        if (source (systemEnviron, td->startup, td_setup)) {
+            LogError ("Cannot execute startup script %\"s\n", td->startup);
+            exit (1);
+        }
+
         if (Setjmp (mstrtalk.errjmp))
             exit (1);
@@ -1528,11 +1524,4 @@ SessionExit (int status)
     } else
         ResetServer (td);
-    if (sourceReset) {
-        /*
-         * run system-wide reset file
-         */
-        Debug ("source reset program %s\n", td->reset);
-        source (systemEnviron, td->reset, td_setup);
-    }
     if (removeAuth)
     {
@@ -1550,4 +1539,8 @@ SessionExit (int status)
         }
 #endif
+
+        if (source (systemEnviron, td->reset, td_setup))
+            LogError ("Cannot execute reset script %\"s\n", td->reset);
+
         SetUser (curuser, curuid, curgid);
         RemoveUserAuthorization (td);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic