$OpenBSD: patch-spooler_Spooler_cpp,v 1.9 2011/11/17 15:14:37 ajacoutot Exp $

XXX to be revisited

--- spooler/Spooler.cpp.orig	Thu Nov 17 03:03:22 2011
+++ spooler/Spooler.cpp	Thu Nov 17 14:59:14 2011
@@ -1217,6 +1217,7 @@ int main(int argc, char *argv[]) {
 
 	// detect linuxthreads, which is too broken to correctly run the spooler
 	if (!bForked) {
+#if defined(__linux__)
 		char buffer[256];
 		confstr(_CS_GNU_LIBPTHREAD_VERSION, buffer, sizeof(buffer));
 		if (strncmp(buffer, "linuxthreads", strlen("linuxthreads")) == 0) {
@@ -1225,6 +1226,9 @@ int main(int argc, char *argv[]) {
 			g_lpLogger->Log(EC_LOGLEVEL_FATAL, "WARNING: your system is running with outdated linuxthreads.");
 			g_lpLogger->Log(EC_LOGLEVEL_FATAL, "WARNING: the zarafa-spooler will only be able to send one message at a time.");
 		}
+#elif defined(__OpenBSD__)
+		bNPTL = false;
+#endif
 	}
 
 	// set socket filename
@@ -1323,11 +1327,8 @@ int main(int argc, char *argv[]) {
 		if (bNPTL) {
 			g_lpLogger->Log(EC_LOGLEVEL_DEBUG, "Joining signal thread");
 			pthread_join(signal_thread, NULL);
-			g_lpLogger->Log(EC_LOGLEVEL_FATAL, "Spooler shutdown complete");
-		} else {
-			// ignore the death of the pipe logger
-			signal(SIGCHLD, SIG_IGN);
 		}
+		g_lpLogger->Log(EC_LOGLEVEL_FATAL, "Spooler shutdown complete");
 	}
 
 	MAPIUninitialize();
