blob: c590fbed80c18747907b0f13c53fae5f53178879 (
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
30
|
diff -aur slim-1.3.2.a/app.cpp slim-1.3.2.b/app.cpp
--- slim-1.3.2.a/app.cpp 2010-08-21 15:10:13.702755711 +0200
+++ slim-1.3.2.b/app.cpp 2010-08-21 15:10:48.579631179 +0200
@@ -280,21 +280,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);
|