[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    icecream
From:       Michael Matz <matz () kde ! org>
Date:       2006-07-10 10:35:49
Message-ID: 1152527749.530340.12908.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 560437 by matz:

Try to fix logrotation.


 M  +0 -1      daemon/main.cpp  
 M  +4 -6      services/logging.cpp  


--- trunk/icecream/daemon/main.cpp #560436:560437
@@ -313,7 +313,6 @@
 
     signal(SIGTERM, &dcc_daemon_terminate);
     signal(SIGINT, &dcc_daemon_terminate);
-    signal(SIGHUP, &dcc_daemon_terminate);
     signal(SIGALRM, &dcc_daemon_terminate);
 }
 
--- trunk/icecream/services/logging.cpp #560436:560437
@@ -32,7 +32,7 @@
 ostream *logfile_warning = 0;
 ostream *logfile_error = 0;
 static ofstream logfile_null( "/dev/null" );
-static ofstream *logfile_file = 0;
+static ofstream logfile_file;
 static string logfile_filename;
 
 void reset_debug( int );
@@ -42,13 +42,11 @@
     debug_level = level;
     logfile_filename = filename;
 
-    delete logfile_file;
-    logfile_file = 0;
+    logfile_file.close();
     ostream *output = 0;
     if ( filename.length() ) {
-	logfile_file = new ofstream();
-        logfile_file->open( filename.c_str(), fstream::out | fstream::app );
-        output = logfile_file;
+        logfile_file.open( filename.c_str(), fstream::out | fstream::app );
+        output = &logfile_file;
     } else
         output = &cerr;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic