Commit 3d0057d4c3d5df8d2e0d6812adae48d1ecff3da4

Authored by Georg Hopp
1 parent 983c9339

daemonize testserver now

... ... @@ -17,9 +17,9 @@ AC_PROG_CC_C99
17 17 AC_PROG_LIBTOOL
18 18 AM_PROG_CC_C_O
19 19
20   -# Checks for libraries.
21   -AC_CHECK_LIB([json], [json_object_new_object], [],
22   - [AC_MSG_ERROR([json-c library not found], [1])])
  20 +# # Checks for libraries.
  21 +# AC_CHECK_LIB([json], [json_object_new_object], [],
  22 +# [AC_MSG_ERROR([json-c library not found], [1])])
23 23
24 24 # Checks for header files.
25 25 AC_CHECK_HEADERS([stdarg.h string.h stdlib.h stdio.h unistd.h syslog.h sys/types.h json/json.h])
... ...
... ... @@ -13,10 +13,12 @@
13 13
14 14 #include "interface/class.h"
15 15
  16 +void daemonize(void);
  17 +
16 18 int
17 19 main()
18 20 {
19   - Logger logger = new(LoggerStderr, LOGGER_ERR);
  21 + Logger logger = new(LoggerSyslog, LOGGER_ERR);
20 22 HttpRequestParser parser = new(HttpRequestParser);
21 23 Server server = new(Server, logger, parser, 11212, SOMAXCONN);
22 24
... ... @@ -24,6 +26,7 @@ main()
24 26 setrlimit(RLIMIT_CPU, &limit);
25 27
26 28 init_signals();
  29 + daemonize();
27 30 serverRun(server);
28 31
29 32 delete(&server);
... ...
Please register or login to post a comment