-rw-r--r-- | core/qws/main.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/core/qws/main.cpp b/core/qws/main.cpp index bfed283..1c3c621 100644 --- a/core/qws/main.cpp +++ b/core/qws/main.cpp @@ -1,50 +1,48 @@ -#include <qwindowsystem_qws.h> -#include <qapplication.h> #include "oqwsserver.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <syslog.h> #include <stdio.h> #define APPNAME "op-qws" void toSyslog(QtMsgType type, const char *msg) { int level = LOG_INFO; switch (type) { case QtDebugMsg: level = LOG_DEBUG; break; case QtWarningMsg: level = LOG_WARNING; break; case QtFatalMsg: level = LOG_ERR; break; } syslog (LOG_DAEMON | level, msg); } int daemon_init(void) { pid_t pid; if ((pid = fork()) < 0) return(-1); else if (pid != 0) exit(0); setsid(); chdir("/"); umask(0); fclose(stdout); fclose(stderr); fclose(stdin); |