comparison sources/engine.cpp @ 5:0faceb076254

code clean up added PID to the default Core argument bool => true|false
author Vlad Glagolev <enqlave@gmail.com>
date Thu, 24 Jan 2008 21:00:52 +0300
parents a7051ac7118b
children 8d54d9fdeca3
comparison
equal deleted inserted replaced
4:a7051ac7118b 5:0faceb076254
21 21
22 #include "engine.hpp" 22 #include "engine.hpp"
23 23
24 bool daemonize() 24 bool daemonize()
25 { 25 {
26 if (daemon (1, 1) != 0) { 26 if (daemon(1, 1) != 0) {
27 cout << "Error: unable to daemonize into background\n"; 27 cout << "Error: unable to daemonize into background\n";
28 exit (1); 28 exit(1);
29 } else { 29 } else {
30 cout << "ENGINE: successfully daemonized into background\n"; 30 cout << "ENGINE: successfully daemonized into background\n";
31 return daemon (1, 1) == 0; 31 return daemon(1, 1) == 0;
32 } 32 }
33 } 33 }
34 34
35 time_t gettime() 35 time_t gettime()
36 { 36 {
37 time_t t; 37 time_t t;
38 return time (&t); 38 return time(&t);
39 } 39 }
40 40
41 string getCountry(string c) 41 string getCountry(string c)
42 { 42 {
43 if (c == "") 43 if (c == "")