From af0291c48a3f155c89d9f2300bd9f614a82d382f Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 1 Jul 2011 23:23:02 +0000 Subject: [PATCH] Do not ignore SIGCHLD when shutting down the spooler to avoid having zombie processes around after shutting down. Remove the XXX hack from the rc script, because that's not needed anymore. ok ajacoutot@ --- mail/zarafa/zarafa/Makefile | 4 +-- .../zarafa/patches/patch-spooler_Spooler_cpp | 26 ++++++++++++++----- mail/zarafa/zarafa/pkg/zarafa_spooler.rc | 9 +------ 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/mail/zarafa/zarafa/Makefile b/mail/zarafa/zarafa/Makefile index 7b4e4f013a5..30864ba7036 100644 --- a/mail/zarafa/zarafa/Makefile +++ b/mail/zarafa/zarafa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.91 2011/06/27 14:31:36 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.92 2011/07/01 23:23:02 robert Exp $ COMMENT-main= MS Exchange groupware suite replacement COMMENT-web= zarafa webaccess frontend and MAPI extensions for PHP @@ -7,7 +7,7 @@ PKGNAME= zarafa-${V} PKGNAME-main= zarafa-${V} PKGNAME-web= zarafa-webaccess-${V} -REVISION-main= 9 +REVISION-main= 10 REVISION-web= 3 CATEGORIES= mail www productivity diff --git a/mail/zarafa/zarafa/patches/patch-spooler_Spooler_cpp b/mail/zarafa/zarafa/patches/patch-spooler_Spooler_cpp index 5588ff1aac4..18d5b43b3bc 100644 --- a/mail/zarafa/zarafa/patches/patch-spooler_Spooler_cpp +++ b/mail/zarafa/zarafa/patches/patch-spooler_Spooler_cpp @@ -1,9 +1,9 @@ -$OpenBSD: patch-spooler_Spooler_cpp,v 1.6 2011/06/10 15:55:00 ajacoutot Exp $ +$OpenBSD: patch-spooler_Spooler_cpp,v 1.7 2011/07/01 23:23:02 robert Exp $ XXX to be revisited ---- spooler/Spooler.cpp.orig Fri Jun 10 03:37:37 2011 -+++ spooler/Spooler.cpp Fri Jun 10 13:33:17 2011 +--- spooler/Spooler.cpp.orig Wed Jun 22 00:02:19 2011 ++++ spooler/Spooler.cpp Sat Jul 2 01:07:50 2011 @@ -1213,6 +1213,7 @@ int main(int argc, char *argv[]) { if (g_lpConfig->HasWarnings()) LogConfigErrors(g_lpConfig, g_lpLogger); @@ -12,16 +12,30 @@ XXX to be revisited // detect linuxthreads, which is too broken to correctly run the spooler if (!bForked) { char buffer[256]; -@@ -1224,6 +1225,12 @@ int main(int argc, char *argv[]) { +@@ -1224,7 +1225,13 @@ int main(int argc, char *argv[]) { g_lpLogger->Log(EC_LOGLEVEL_FATAL, "WARNING: the zarafa-spooler will only be able to send one message at a time."); } } +#endif -+ + +#ifdef __OpenBSD__ + bNPTL = false; +#endif + - ++ // set socket filename if (!szPath) + szPath = g_lpConfig->GetSetting("server_socket"); +@@ -1321,11 +1328,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(); diff --git a/mail/zarafa/zarafa/pkg/zarafa_spooler.rc b/mail/zarafa/zarafa/pkg/zarafa_spooler.rc index fc059ebe73e..e39a858aeb7 100755 --- a/mail/zarafa/zarafa/pkg/zarafa_spooler.rc +++ b/mail/zarafa/zarafa/pkg/zarafa_spooler.rc @@ -1,16 +1,9 @@ #!/bin/sh # -# $OpenBSD: zarafa_spooler.rc,v 1.5 2011/06/27 06:23:39 ajacoutot Exp $ +# $OpenBSD: zarafa_spooler.rc,v 1.6 2011/07/01 23:23:02 robert Exp $ daemon="${TRUEPREFIX}/bin/zarafa-spooler" . /etc/rc.d/rc.subr -# XXX hangs forever (threads?) -rc_stop() { - pkill -f "^${pexp}" - sleep 1 - pkill -9 -f "^${pexp}" -} - rc_cmd $1