--- smsdaemon/common.cpp 2008/12/07 20:06:12 146 +++ smsdaemon/common.cpp 2008/12/07 21:42:15 150 @@ -32,6 +32,8 @@ _taskManager = new TaskManager(); configFilePath = "/etc/smsdaemon.conf"; _configFile = new ConfigFile(); + + daemonized = false; } @@ -72,7 +74,7 @@ out << ":" << setw(2) << setfill('0') << now.tm_sec; out << " " << msg << endl; - if (this->isDaemon && _logFile != "") + if (this->isDaemon && _logFile != "" && daemonized) { seteuid(0); ofstream of( _logFile.c_str(), ios_base::out | ios_base::app | ios_base::ate);//append mode