Index: /Chief/Chief.cc
===================================================================
--- /Chief/Chief.cc	(revision 230)
+++ /Chief/Chief.cc	(revision 231)
@@ -114,5 +114,5 @@
   static ChiefClass TheBoss;
 
-  // Sleep until signal caught
-  pause();
+  // Sleep until exit requested
+  while (!TheBoss.ExitRequest) pause();
 }
Index: /Evidence/DColl.cc
===================================================================
--- /Evidence/DColl.cc	(revision 230)
+++ /Evidence/DColl.cc	(revision 231)
@@ -55,5 +55,4 @@
 	void RemoveService(string);
 	off_t FileSize(FILE *);
-    void ConfigChanged();
 
   public:
@@ -62,8 +61,4 @@
 }; 
 
-void DataHandler::ConfigChanged() {
-  //printf("Handler called in PID %u\n", pthread_self());
-}
-
 //
 // Constructor
@@ -106,6 +101,4 @@
   vector<string> Exclude = Tokenize(GetConfig("exclude"), " \t");
   for (int i=0; i<Exclude.size(); i++) {
-	printf("'%s'\n",Exclude[i].c_str());
-
 	int Ret = regcomp(&R, Exclude[i].c_str(), REG_EXTENDED|REG_NOSUB);
 	if (Ret != 0) {
@@ -306,5 +299,5 @@
 //
 void DataHandler::commandHandler() {
- return;
+
   if (getCommand() != LogCommand || LogFile == NULL) return;
 
@@ -319,8 +312,7 @@
   struct tm *TM = localtime(&RawTime);
 
-  fprintf(LogFile, "%2d/%2d/%4d %2d:%2d:%2d %s (ID %d): %s\n",
+  fprintf(LogFile, "%.2d/%.2d/%4d %.2d:%.2d:%2.d %s (ID %d): %s\n",
   		TM->tm_mday, TM->tm_mon+1, TM->tm_year+1900,
 		TM->tm_hour, TM->tm_min, TM->tm_sec, getClientName(), getClientId(), Text);
-
   fflush(LogFile);
   
Index: /Evidence/Edd/Edd.cc
===================================================================
--- /Evidence/Edd/Edd.cc	(revision 230)
+++ /Evidence/Edd/Edd.cc	(revision 231)
@@ -112,7 +112,6 @@
   if (ServiceName != Name) return;
 
+  // Check if service available
   QPalette Pal = palette();  
-
-  // Check if service available
   if (!SetStatus(this, Name, Time, Format, Index)) {
     setText("n/a");
@@ -810,5 +809,5 @@
 
   // Connect to DIM handler
-  if (connect(this, SIGNAL(YEP(QString, int, QByteArray, QString, QString)), SLOT(Update(QString, int, QByteArray, QString, QString))) == false) {
+  if (connect(this, SIGNAL(INT(QString, int, QByteArray, QString, QString)), SLOT(Update(QString, int, QByteArray, QString, QString))) == false) {
     printf("Failed connection in EddDim()\n");
   }
@@ -843,6 +842,6 @@
   New.Name = Name;
   New.ByteArray = QByteArray();
+  New.Count = 1;
   New.DIMService = new DimStampedInfo(Name.toAscii().data(), INT_MAX, NO_LINK, this);
-  New.Count = 1;
   ServiceList.append(New);
 
@@ -936,4 +935,6 @@
   // Update statistics only for Dim services
   if (!Name.startsWith("Edd/")) Volume += Data.size();
+  
+  YEP(Name, Time, Data, Format, Text);  
 }
 
@@ -941,11 +942,8 @@
 void EddDim::infoHandler() {
 
-  if (!EvidenceServer::ServiceOK(getInfo())) YEP(getInfo()->getName(), -1);
+  if (!EvidenceServer::ServiceOK(getInfo())) INT(getInfo()->getName(), -1);
   else {
-	YEP(getInfo()->getName(),
-		getInfo()->getTimestamp(),
-		QByteArray((char *) getInfo()->getData(), 
-		getInfo()->getSize()), getInfo()->getFormat(),
-		QString::fromStdString(EvidenceServer::ToString(getInfo())));
+	INT(getInfo()->getName(), getInfo()->getTimestamp(), QByteArray((char *) getInfo()->getData(), 
+		getInfo()->getSize()), getInfo()->getFormat(), QString::fromStdString(EvidenceServer::ToString(getInfo())));
   }
 }
@@ -1235,5 +1233,5 @@
   Layout->addWidget(Command, 10, 0, 1, 4);    
 
-  EddText *Text = new EddText("Bias/Textout", true);
+  EddText *Text = new EddText("Bias/ConsoleOut", true);
   Text->setFixedWidth(400);
   Layout->addWidget(Text, 11, 0, 4, 4);      
@@ -1623,8 +1621,5 @@
 
 
-//---------------------------------------------------------------------
 //**************************** Main program ***************************
-//---------------------------------------------------------------------
-
 int main(int argc, char *argv[]) {
 
Index: /Evidence/Edd/Edd.h
===================================================================
--- /Evidence/Edd/Edd.h	(revision 230)
+++ /Evidence/Edd/Edd.h	(revision 231)
@@ -251,4 +251,5 @@
   signals:
     void YEP(QString, int, QByteArray = QByteArray(), QString = QString(), QString = QString());
+    void INT(QString, int, QByteArray = QByteArray(), QString = QString(), QString = QString());
 };
 
Index: /Evidence/Evidence.cc
===================================================================
--- /Evidence/Evidence.cc	(revision 230)
+++ /Evidence/Evidence.cc	(revision 231)
@@ -10,8 +10,8 @@
     this severity, the call to Message() is guranteed not to return).
   - Configuration data can be requested by GetConfig() and non-blocking by GetConfigNB().
-  - If the configuration file changes the signal SIGUSR1 is emitted which is caught by the standard
+  - If the configuration file changes a signal can be emitted which is caught by the standard
     signal handler. The handler invokes ConfigChanged() which can be redefined by the user application.
 	The signal is delivered only to the main thread (where the constructor is executed) and thus
-	blocking rpc can be made from it.
+	blocking rpc can be made from it. The signal is set using ActivateSignal().
   - Signal handlers to ignore common signals are installed.
     These signals will then cause pause() to return which can be used
@@ -45,5 +45,5 @@
   ConfigTimeStamp = 0;
   
-  // SIGUSR2 delivered to this thread if configuration file changes 
+  // Signal delivered to this thread if configuration file changes 
   ThreadID = pthread_self();
 
@@ -70,6 +70,6 @@
   Unlock();
 
-  if (pthread_kill(ThreadID, SIGUSR2) != 0) {
-	ThisServer->Message(ThisServer->WARN, "Could not send signal SIGUSR2 to main thread");
+  if (pthread_kill(ThreadID, ThisServer->ConfigSignal) != 0) {
+	ThisServer->Message(ThisServer->WARN, "Could not send signal to main thread");
   }
 }
@@ -111,5 +111,5 @@
 	}
 	else {
-	  if (Config.getSize() == 0) Result = Default;
+	  if (Config.getSize() <= 1) Result = Default;
 	  else Result = string(Config.getString(), Config.getSize()-1); // Retrieve string safely
     }
@@ -143,13 +143,16 @@
 }
 
-// Locking and unlocking for list access. Signal SIGUSR2 is also blocked.
+// Locking and unlocking for list access
+// Signal blocked before locking to avaoid dead-lock by calling GetConfig() from ConfigChanged().
 void EvidenceServer::Config::Lock() {
 
   int Ret = 0;
   sigset_t Set;
-  //printf("Locking %u\n", pthread_self());
-  Ret += abs(sigemptyset(&Set));
-  Ret += abs(sigaddset(&Set, SIGUSR2));
-  Ret += abs(pthread_sigmask(SIG_BLOCK, &Set, NULL));
+
+  if (ThisServer->ConfigSignal != 0) {
+	Ret += abs(sigemptyset(&Set));
+	Ret += abs(sigaddset(&Set, ThisServer->ConfigSignal));
+	Ret += abs(pthread_sigmask(SIG_BLOCK, &Set, NULL));
+  }
   Ret += abs(pthread_mutex_lock(&Mutex));
   
@@ -163,10 +166,11 @@
   int Ret = 0;
   sigset_t Set;
-  //printf("  Unlocking %u\n", pthread_self());
 
   Ret += abs(pthread_mutex_unlock(&Mutex));
-  Ret += abs(sigemptyset(&Set));
-  Ret += abs(sigaddset(&Set, SIGUSR2));
-  Ret += abs(pthread_sigmask(SIG_UNBLOCK, &Set, NULL));
+  if (ThisServer->ConfigSignal != 0) {
+	Ret += abs(sigemptyset(&Set));
+	Ret += abs(sigaddset(&Set, ThisServer->ConfigSignal));
+	Ret += abs(pthread_sigmask(SIG_UNBLOCK, &Set, NULL));
+  }
 
   if (Ret != 0) {
@@ -179,4 +183,6 @@
 // EvidenceServer Class //
 //////////////////////////
+
+int EvidenceServer::ConfigSignal = 0;
 
 // Constructor starts server with given name
@@ -195,13 +201,8 @@
   signal(SIGHUP, &SignalHandler);   // Terminal closed
   
-  struct sigaction S;
-  S.sa_handler = &SignalHandler;
-  S.sa_flags = SA_RESTART;
-  sigaction(SIGUSR2, &S, NULL);
-
   // Catch C++ unhandled exceptions
   set_terminate(Terminate);
 
-  // Configuration class (instantiate after signal handling for SIGUSR2 installed)
+  // Configuration class (must be instantiate after signal handling installed)
   ConfClass = new class Config(Name);
 
@@ -310,4 +311,16 @@
 }
 
+// Signal emitted when configuraton file changes, signal handler calls ConfigChanged()
+void EvidenceServer::ActivateSignal(int Signal) {
+
+  struct sigaction S;
+
+  ConfigSignal = Signal;
+  S.sa_handler = &SignalHandler;
+  S.sa_flags = SA_RESTART;
+  sigaction(Signal, &S, NULL);
+}
+
+
 // ====== Static methods ======
 
@@ -317,6 +330,6 @@
   static bool Called = false;
 
-  // If SIGUSR2, invoke call-back for configuraton change
-  if (Signal == SIGUSR2) {
+  // If signal indicates configuration change, invoke call-back
+  if (Signal == EvidenceServer::ConfigSignal) {
     ThisServer->ConfigChanged();
 	return;
@@ -338,11 +351,11 @@
 void EvidenceServer::Terminate() {
 
-  static char Msg[STATUS_SIZE];
+  ostringstream Msg;
   static bool Terminating = false;
 
   if (Terminating) {
-	snprintf(Msg, sizeof(Msg), "%s: Terminate() called recursively, calling abort()", ThisServer->MessageService->getName());
-	printf("%s\n", Msg);
-	DimClient::sendCommandNB("DColl/Log", Msg);
+	Msg << ThisServer->Name << ": Terminate() called recursively, calling abort()";
+	printf("%s\n", Msg.str().c_str());
+	ThisServer->SendToLog(Msg.str().c_str());
 	abort();
   }
@@ -358,5 +371,5 @@
 
 	Demangled = abi::__cxa_demangle(Type->name(), 0, 0, &Status);
-	snprintf(Msg, sizeof(Msg), "Terminate() called after throwing an instance of '%s'", Status==0 ? Demangled : Type->name());
+	Msg << "Terminate() called after throwing an instance of '" << (Status==0 ? Demangled : Type->name()) << "'";
 	free(Demangled);
 
@@ -364,11 +377,11 @@
 	try { __throw_exception_again; }
 	catch (exception &E) {
-	  snprintf(Msg+strlen(Msg), sizeof(Msg)-strlen(Msg), " (what(): %s)", E.what());	  
+	  Msg << " (what(): " << E.what() << ")";	  
 	}
 	catch (...) { }
   }
-  else snprintf(Msg, sizeof(Msg), "Terminate() called without an active exception");
-
-  ThisServer->Message(FATAL, Msg);
+  else Msg << "Terminate() called without an active exception";
+
+  ThisServer->Message(FATAL, Msg.str().c_str());
 }
 
Index: /Evidence/Evidence.h
===================================================================
--- /Evidence/Evidence.h	(revision 230)
+++ /Evidence/Evidence.h	(revision 231)
@@ -18,7 +18,5 @@
 
 #define NO_LINK (char *) "__&DIM&NOLINK&__" // Data if no link available
-#define STATUS_SIZE 1000					// Bytes for status service string
 #define EVIDENCE_REVISION "$Revision$"
-
 
 // Class declation of Evidence server
@@ -61,5 +59,6 @@
 	struct Message *MessageData;
 	class Config *ConfClass;
-	
+	static int ConfigSignal;		// static since accessed in signal handler
+
     static void SignalHandler(int); // static for signal()
     static void Terminate();  		// static for set_terminate()
@@ -77,4 +76,5 @@
 	void SendToLog(const char *, ...);
 	std::string GetConfig(std::string, std::string = std::string());
+	void ActivateSignal(int);
 	static std::string ToString(DimInfo *);
 	static bool ServiceOK(DimInfo *);
