summaryrefslogtreecommitdiffstats
path: root/test/slim/slim-tty-slowness.patch
blob: 1f1f2e1667b441722fde89a49e8e525b91c02600 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- slim-1.3.1.orig/app.cpp	2009-01-13 11:30:36.000000000 +0900
+++ slim-1.3.1/app.cpp	2009-01-13 11:32:27.000000000 +0900
@@ -270,21 +270,22 @@
         signal(SIGALRM, AlarmSignal);
 
 #ifndef XNEST_DEBUG
-        OpenLog();
-        
         if (!force_nodaemon && cfg->getOption("daemon") == "yes") {
             daemonmode = true;
         }
 
         // Daemonize
         if (daemonmode) {
-            if (daemon(0, 1) == -1) {
+            if (daemon(0, 0) == -1) {
                 cerr << APPNAME << ": " << strerror(errno) << endl;
                 exit(ERR_EXIT);
             }
-            UpdatePid();
         }
 
+        OpenLog();
+        
+        if (daemonmode) UpdatePid();
+
         CreateServerAuth();
         StartServer();
         alarm(2);